diff --git a/Device/Histo/IntensityDataIOFactory.cpp b/Device/Histo/IntensityDataIOFactory.cpp
index 0694e2a1aa239f27e48987944af38969b085e9db..7cb0d7ac54a3dcae5bf0b689d356311b5fb3e161 100644
--- a/Device/Histo/IntensityDataIOFactory.cpp
+++ b/Device/Histo/IntensityDataIOFactory.cpp
@@ -48,8 +48,8 @@ OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& fi
     // Try to read ASCII by default. Binary maps to ASCII.
     // If the file is not actually a matrix of numbers,
     // the error will be thrown during the reading.
-    return readOutputData(
-        file_name, [](std::istream& s) { return OutputDataReadWriteNumpyTXT().readOutputData(s); });
+    return readOutputData(file_name,
+                   [](std::istream& s) { return OutputDataReadWriteNumpyTXT().readOutputData(s); });
 }
 
 OutputData<double>* IntensityDataIOFactory::readReflectometryData(const std::string& file_name) {
@@ -93,7 +93,7 @@ void IntensityDataIOFactory::writeOutputData(const std::string& file_name,
 #ifdef _WIN32
     fout.open(FileSystemUtils::convert_utf8_to_utf16(file_name), openmode);
 #else
-    fout.open(file_name, openmode);
+    fout.open(m_file_name, openmode);
 #endif
 
     if (!fout.is_open())
@@ -146,7 +146,7 @@ IntensityDataIOFactory::readOutputData(const std::string& file_name,
 #ifdef _WIN32
     input_stream.open(FileSystemUtils::convert_utf8_to_utf16(file_name), openmode);
 #else
-    input_stream.open(file_name, openmode);
+    fin.open(m_file_name, openmode);
 #endif
 
     if (!input_stream.is_open())
diff --git a/Device/Histo/IntensityDataIOFactory.h b/Device/Histo/IntensityDataIOFactory.h
index 5b1f71374f47c305521b68f11211a63a8301d113..1c72aaf86bfc821bc60d412bffc148d247ea5e81 100644
--- a/Device/Histo/IntensityDataIOFactory.h
+++ b/Device/Histo/IntensityDataIOFactory.h
@@ -63,12 +63,11 @@ public:
     static void writeSimulationResult(const SimulationResult& result, const std::string& file_name);
 
 private:
-    static OutputData<double>*
-    readOutputData(const std::string& file_name,
-                   std::function<OutputData<double>*(std::istream&)> readData);
-
-    static void writeOutputData(const std::string& file_name,
-                                std::function<void(std::ostream&)> writeData);
+    static OutputData<double>* readOutputData(const std::string& file_name,
+        std::function<OutputData<double>* (std::istream&)> readData);
+
+    static void writeOutputData(const std::string& file_name, 
+        std::function<void(std::ostream&)> writeData);
 };
 
 #endif // BORNAGAIN_DEVICE_HISTO_INTENSITYDATAIOFACTORY_H
diff --git a/Device/InputOutput/OutputDataReadWriteINT.cpp b/Device/InputOutput/OutputDataReadWriteINT.cpp
index 09ddb0bd8fdcb817c1317e3887b1a8ce59292d90..9fa75e8d0308348b580bcc24db2669b54d92034c 100644
--- a/Device/InputOutput/OutputDataReadWriteINT.cpp
+++ b/Device/InputOutput/OutputDataReadWriteINT.cpp
@@ -13,8 +13,8 @@
 //  ************************************************************************************************
 
 #include "Device/InputOutput/OutputDataReadWriteINT.h"
-#include "Base/Utils/StringUtils.h"
 #include "Device/InputOutput/DataFormatUtils.h"
+#include "Base/Utils/StringUtils.h"
 #include "Device/Intensity/ArrayUtils.h"
 
 namespace {