Index: trunk/FACT++/src/dimctrl.cc
===================================================================
--- trunk/FACT++/src/dimctrl.cc	(revision 13680)
+++ trunk/FACT++/src/dimctrl.cc	(revision 13681)
@@ -65,4 +65,10 @@
         fData = Tools::Split(opt);
 
+        if (opt.size()>0)
+            Debug("Start '"+opt+"' received.");
+
+        if (fDebug)
+            Debug("Received data: "+string(fDimStart.getString()));
+
         if (opt.size()==0)
         {
@@ -73,12 +79,4 @@
 
             return;
-        }
-
-        Debug("Start '"+opt+"' received.");
-        if (fDebug)
-        {
-            string d(fDimStart.getString());
-            if (d.length()>opt.length())
-                Debug("Received data: "+string(fDimStart.getString()).substr(opt.length()+1));
         }
 
@@ -142,4 +140,20 @@
     }
 
+    string Line(const string &txt, char fill)
+    {
+        const int n = (55-txt.length())/2;
+
+        ostringstream out;
+        out << setfill(fill);
+        out << setw(n) << fill << ' ';
+        out << txt;
+        out << ' ' << setw(n) << fill;
+
+        if (2*n+txt.length()+2 != 57)
+            out << fill;
+
+        return out.str();
+    }
+
     int Write(const Time &time, const std::string &txt, int qos=kMessage)
     {
@@ -150,16 +164,20 @@
             if (fDebug)
             {
-                ostringstream out;
+                string msg;
                 if (fLabel<0)
                 {
                     if (fLabel==-1)
-                        out << "========================== Begin ========================";
+                        msg = Line("Begin ["+fScript+"]", '=');
                     else
-                        out << "=========================== End =========================";
+                        msg = Line("End ["+fScript+"]", '=');
                 }
                 else
-                    out << "------------------------ Label " << setfill('0') << setw(3) << fLabel << " ----------------------";
-
-                MessageDimTX::Write(time, out.str(), 90);
+                {
+                    ostringstream out;
+                    out << "Label " << fLabel << " [" << fScript << "]";
+                    msg = Line(out.str(), '-');
+                }
+
+                MessageDimTX::Write(time, msg, 90);
             }
 
@@ -167,8 +185,12 @@
             switch (fLabel)
             {
-            case -2: return fSrvState.Update("End of script execution");
-            case -1: return fSrvState.Update("Start of script execution");
-            default: return fSrvState.Update("New label");
+            case -2: return fSrvState.Update(fScript+" [end]");
+            case -1: return fSrvState.Update(fScript+" [load]");
+            case  0: return fSrvState.Update(fScript+" [start]");
             }
+
+            ostringstream msg;
+            msg << fScript << " [label=" << fLabel << "]";
+            return fSrvState.Update(msg.str());
         }
 
