Index: /trunk/FACT++/src/datalogger.cc
===================================================================
--- /trunk/FACT++/src/datalogger.cc	(revision 12118)
+++ /trunk/FACT++/src/datalogger.cc	(revision 12119)
@@ -805,5 +805,5 @@
         ("Transition to exit error states. Closes the any open file.");
 
-    AddEvent(kSM_WaitingRun, "WAIT_FOR_RUN_NUMBER", kSM_NightlyOpen, kSM_Ready)
+    AddEvent(kSM_WaitingRun, "WAIT_FOR_RUN_NUMBER", kSM_Logging, kSM_NightlyOpen, kSM_Ready)
         (bind(&DataLogger::NightlyToWaitRunPlease, this))
         ("Go to waiting for run number state. In this state with any received run-number a new file is opened.");
@@ -2249,4 +2249,7 @@
 {
     int cState = GetCurrentState();
+
+    if (cState == kSM_Logging)
+        StopRunPlease();
     if (cState == kSM_Ready)
         cState = StartPlease();
