Index: trunk/FACT++/src/datalogger.cc
===================================================================
--- trunk/FACT++/src/datalogger.cc	(revision 18464)
+++ trunk/FACT++/src/datalogger.cc	(revision 18465)
@@ -1513,4 +1513,11 @@
         msg << sub.server << serviceName;
 
+
+        //in case of non messages message (i.e. binary data written to logs)
+        //we override the quality before writing to .log, otherwise it will wrongly decorate the log entry
+        //because fQuality is really the system state in some cases.
+        //so save a backup of the original value before writing to fits
+        int backup_quality = fQuality;
+
         //fix the quality of non message "messages"
         if (!isMessage)
@@ -1534,4 +1541,8 @@
                 return;
         }
+
+        //in case we have overriden the fQuality before writing to log, restore the original value before writing to FITS
+        if (!isMessage)
+            fQuality = backup_quality;
 
 //        sub.lastReceivedEvent = cTime;
