diff --git a/MeshLib/IO/XDMF/HdfWriter.cpp b/MeshLib/IO/XDMF/HdfWriter.cpp
index f7b7938593a5f6664ade18fbcf3719200c2f75a0..9faddc5cf82415a1928b08291dadff77d788dcd7 100644
--- a/MeshLib/IO/XDMF/HdfWriter.cpp
+++ b/MeshLib/IO/XDMF/HdfWriter.cpp
@@ -20,8 +20,8 @@
 #include "fileIO.h"
 
 template <typename... Args>
-void checkHdfStatus(const hid_t status, const std::string formatting,
-                    Args... args)
+void checkHdfStatus(const hid_t status, std::string const& formatting,
+                    Args&&... args)
 {
     if (status < 0)
     {
@@ -199,4 +199,4 @@ bool HdfWriter::writeStep(int const step) const
     status = H5Fclose(file);
     return (status >= 0);
 }
-}  // namespace MeshLib::IO
\ No newline at end of file
+}  // namespace MeshLib::IO