Index: trunk/FACT++/src/datalogger.cc
===================================================================
--- trunk/FACT++/src/datalogger.cc	(revision 17341)
+++ trunk/FACT++/src/datalogger.cc	(revision 17342)
@@ -202,4 +202,6 @@
     /// ofstream for the NightlyLogfile
     ofstream fNightlyLogFile;
+    /// Log stream to fNightlyLogFile
+    MessageImp fNightlyLogImp;
     /// ofstream for the Nightly report file
     ofstream fNightlyReportFile;
@@ -490,6 +492,5 @@
     if (fNightlyLogFile.is_open())
     {
-        MessageImp mimp(fNightlyLogFile);
-        mimp.Write(time, ss.str(), qos);
+        fNightlyLogImp.Write(time, ss.str(), qos);
     }
     else if (shouldBackLog)
@@ -909,5 +910,5 @@
 //
 DataLogger::DataLogger(ostream &out) : StateMachineDim(out, "DATA_LOGGER"),
-                                       fFilesStats("DATA_LOGGER", *this)
+fNightlyLogImp(fNightlyLogFile), fFilesStats("DATA_LOGGER", *this)
 {
     shouldBackLog = true;
@@ -1530,5 +1531,5 @@
         if (fNightlyLogFile.is_open())
         {
-            MessageImp(fNightlyLogFile).Write(cTime, msg.str().c_str(), fQuality);
+            fNightlyLogImp.Write(cTime, msg.str().c_str(), fQuality);
             if (!CheckForOfstreamError(fNightlyLogFile, true))
                 return;
