Index: /trunk/FACT++/src/Readline.cc
===================================================================
--- /trunk/FACT++/src/Readline.cc	(revision 13701)
+++ /trunk/FACT++/src/Readline.cc	(revision 13702)
@@ -71,5 +71,5 @@
 
 Readline *Readline::This   =  0;
-int       Readline::fLabel = -2;
+int       Readline::fLabel = -3;
 
 // --------------------------------------------------------------------------
@@ -1248,5 +1248,5 @@
         return 0;
 
-    SetSection(-1);
+    SetSection(-2);
     fLabel = -1;
 
@@ -1263,5 +1263,5 @@
     if (!fin)
     {
-        SetSection(-2);
+        SetSection(-3);
         return -1;
     }
@@ -1272,10 +1272,10 @@
     fCommandLog << ")" << endl;
 
-    SetSection(0);
+    SetSection(-1);
 
     int rc = 0;
 
     string buffer;
-    while (getline(fin, buffer, '\n'))
+    while (getline(fin, buffer, '\n') && fLabel>-2)
     {
         buffer = Tools::Trim(buffer);
@@ -1304,5 +1304,5 @@
 
     fLabel = -1;
-    SetSection(-2);
+    SetSection(-3);
 
     fCommandLog << "# " << Time() << " - " << name << " (FINISHED)" << endl;
Index: /trunk/FACT++/src/Readline.h
===================================================================
--- /trunk/FACT++/src/Readline.h	(revision 13701)
+++ /trunk/FACT++/src/Readline.h	(revision 13702)
@@ -100,4 +100,5 @@
     void         ProcessLine(const std::string &str);
     static  void SetLabel(int l) { fLabel = l; }
+    static  int  GetLabel() { return fLabel; }
 
     int GetLine() const { return fLine; }
Index: /trunk/FACT++/src/RemoteControl.h
===================================================================
--- /trunk/FACT++/src/RemoteControl.h	(revision 13701)
+++ /trunk/FACT++/src/RemoteControl.h	(revision 13702)
@@ -68,4 +68,6 @@
     int Write(const Time &time, const std::string &txt, int qos=kMessage)
     {
+        if (!fImp)
+            return 0;
         return fImp ? fImp->Write(time, txt, qos) : MessageImp::Write(time, txt, qos);
     }
@@ -213,10 +215,10 @@
             T::GetStreamOut().SetBacklog(false);
             T::GetStreamOut().SetNullOutput(false);
-            while (l->second->GetState()!=state && timeout>Time())
+            while (l->second->GetState()!=state && timeout>Time() && T::GetLabel()!=-2)
                 usleep(1);
             T::GetStreamOut().SetNullOutput(true);
             T::GetStreamOut().SetBacklog(true);
 
-            if (l->second->GetState()!=state)
+            if (T::GetLabel()!=0 && l->second->GetState()!=state)
             {
                 int label = -1;
Index: /trunk/FACT++/src/dimctrl.cc
===================================================================
--- /trunk/FACT++/src/dimctrl.cc	(revision 13701)
+++ /trunk/FACT++/src/dimctrl.cc	(revision 13702)
@@ -95,5 +95,5 @@
         {
             Debug("Stop received");
-            Readline::SetLabel(0);
+            Readline::SetLabel(-2);
         }
 
@@ -165,16 +165,15 @@
             {
                 string msg;
-                if (fLabel<0)
+                switch (fLabel)
                 {
-                    if (fLabel==-1)
-                        msg = Line("Begin ["+fScript+"]", '=');
-                    else
-                        msg = Line("End ["+fScript+"]", '=');
-                }
-                else
-                {
-                    ostringstream out;
-                    out << "Label " << fLabel << " [" << fScript << "]";
-                    msg = Line(out.str(), '-');
+                case -3: msg = Line("End ["+fScript+"]", '=');   break;
+                case -2: msg = Line("Load ["+fScript+"]", '=');  break;
+                case -1: msg = Line("Begin ["+fScript+"]", '-'); break;
+                default:
+                    {
+                        ostringstream out;
+                        out << "Label " << fLabel << " [" << fScript << "]";
+                        msg = Line(out.str(), '-');
+                    }
                 }
 
@@ -185,7 +184,7 @@
             switch (fLabel)
             {
-            case -2: return fSrvState.Update(fScript+" [end]");
-            case -1: return fSrvState.Update(fScript+" [load]");
-            case  0: return fSrvState.Update(fScript+" [start]");
+            case -3: return fSrvState.Update(fScript+" [end]");
+            case -2: return fSrvState.Update(fScript+" [load]");
+            case -1: return fSrvState.Update(fScript+" [start]");
             }
 
