Index: trunk/FACT++/src/dataLogger.cc
===================================================================
--- trunk/FACT++/src/dataLogger.cc	(revision 10938)
+++ trunk/FACT++/src/dataLogger.cc	(revision 10939)
@@ -361,5 +361,5 @@
     ///monitoring notification loop
     void ServicesMonitoring();
-    inline void NotifyOpenedFile(string name, int type, DimDescribedService* service);
+    inline void NotifyOpenedFile(const string &name, int type, DimDescribedService* service);
     ///services notification thread
     boost::thread fMonitoringThread;
@@ -479,9 +479,9 @@
         if (!boost::filesystem::is_directory(fullPath))
         {
-            Error("Path to be created contains a file name: \"" + path + "\"");
+            Error("Path to be created contains a file name: '" + path + "'");
             return false;
         }
-        else
-            return true;
+
+        return true;
     }
     //path does not exist, and upper level have been created already by recusrion.
@@ -516,5 +516,5 @@
     if (!boost::filesystem::is_directory(fullPath))
     {
-        Error("Path given for checking \"" + path + "\" designate a file name. Please provide a path name only");
+        Error("Path given for checking '" + path + "' designate a file name. Please provide a path name only");
         return false;
     }
@@ -522,5 +522,5 @@
     if (access(path.c_str(), R_OK|W_OK|X_OK) != 0)
     {
-        Error("Missing read, write or execute permissions on directory\"" + path + "\"");
+        Error("Missing read, write or execute permissions on directory '" + path + "'");
         return false;
     }
@@ -975,4 +975,5 @@
             {
                 srvc.updateService();
+
                 if(fDebugIsOn)
                 {
@@ -1750,28 +1751,32 @@
 //!        this is not a problem though because file are not opened so often.
 //! @ param type the type of the opened file. 0 = none open, 1 = log, 2 = text, 4 = fits
-inline void DataLogger::NotifyOpenedFile(string name, int type, DimDescribedService* service)
-{
-    if (fOpenedFilesIsOn)
-    {
-        if (fDebugIsOn)
-        {
-            ostringstream str;
-            str << "Updating " << service->getName() << " file '" << name << "' (type=" << type << ")";
-            Debug(str);
-            str.str("");
-            str << "Num subs: " << fNumSubAndFitsData.numSubscriptions << " Num open FITS: " << fNumSubAndFitsData.numOpenFits;
-            Debug(str);
-        }
-        if (name.size()+1 > FILENAME_MAX)
-        {
-            Error("Provided file name \"" + name + "\" is longer than allowed file name length");
-        }
-        OpenFileToDim fToDim;
-        fToDim.code = type;
-        memcpy(fToDim.fileName, name.c_str(), name.size()+1);
-        service->setData(reinterpret_cast<void*>(&fToDim), name.size()+1+sizeof(int));
-        service->setQuality(0);
-        service->updateService();
-    }
+inline void DataLogger::NotifyOpenedFile(const string &name, int type, DimDescribedService* service)
+{
+    if (!fOpenedFilesIsOn)
+        return;
+
+    if (fDebugIsOn)
+    {
+        ostringstream str;
+        str << "Updating " << service->getName() << " file '" << name << "' (type=" << type << ")";
+        Debug(str);
+
+        str.str("");
+        str << "Num subs: " << fNumSubAndFitsData.numSubscriptions << " Num open FITS: " << fNumSubAndFitsData.numOpenFits;
+        Debug(str);
+    }
+
+    if (name.size()+1 > FILENAME_MAX)
+    {
+        Error("Provided file name '" + name + "' is longer than allowed file name length");
+    }
+
+    OpenFileToDim fToDim;
+    fToDim.code = type;
+    memcpy(fToDim.fileName, name.c_str(), name.size()+1);
+
+    service->setData(reinterpret_cast<void*>(&fToDim), name.size()+1+sizeof(int));
+    service->setQuality(0);
+    service->updateService();
 }
 // --------------------------------------------------------------------------
@@ -2027,5 +2032,5 @@
             if (fDebugIsOn)
             {
-                Debug("Writing to nightly FITS " + sub.nightlyFile.fFileName);    
+                Debug("Writing to nightly FITS " + sub.nightlyFile.fFileName);
             }
         }
