Index: /trunk/FACT++/src/dataLogger.cc
===================================================================
--- /trunk/FACT++/src/dataLogger.cc	(revision 10271)
+++ /trunk/FACT++/src/dataLogger.cc	(revision 10272)
@@ -319,7 +319,4 @@
 		fServiceList.SetHandler(this);
 		CheckForServicesUpdate();
-
-		//All configuration done, callback funtions set, go to ready state and thus prevent the run loop from being executed
-		SetReady();
 }
 // --------------------------------------------------------------------------
@@ -1076,7 +1073,5 @@
     // Start io_service.run to only use the commandHandler command detaching
     DataLogger logger(wout);
-
-    while (1)
-        usleep(1);
+    logger.Run(true);
 
     return 0;
@@ -1095,8 +1090,11 @@
             win << kRed << "ERROR - Couldn't open log-file " << conf.Get<std::string>("log") << ": " << strerror(errno) << std::endl;
 
-    DataLogger io_service(wout);
-
-    shell.SetReceiver(io_service);
+    DataLogger logger(wout);
+
+    shell.SetReceiver(logger);
+
+    logger.SetReady();
     shell.Run();                 // Run the shell
+    logger.SetNotReady();
 
     return 0;
