Index: /trunk/FACT++/src/Readline.cc
===================================================================
--- /trunk/FACT++/src/Readline.cc	(revision 13730)
+++ /trunk/FACT++/src/Readline.cc	(revision 13731)
@@ -70,6 +70,7 @@
 using namespace std;
 
-Readline *Readline::This   =  0;
-int       Readline::fLabel = -3;
+Readline   *Readline::This   =  0;
+int         Readline::fLabel = -3;
+std::string Readline::fScript;
 
 // --------------------------------------------------------------------------
@@ -1005,9 +1006,18 @@
     if (str[0]==':')
     {
-        const int section = atoi(str.substr(1).c_str());
-        SetSection(section);
-
-        if (fLabel!=section)
+        try
+        {
+            const int section = stoi(str.substr(1));
+            SetSection(section);
+
+            if (fLabel!=section)
+                return true;
+        }
+        catch (const logic_error &e)
+        {
+            fCommandLog << "# ERROR - Inavlid label '" << str.substr(1) << "'" << endl;
+            fLabel = -2;
             return true;
+        }
 
         fLabel=-1;
@@ -1256,8 +1266,9 @@
         return 0;
 
+    string name = Tools::Trim(fname);
+    fScript = name;
+
     SetSection(-2);
     fLabel = -1;
-
-    string name = Tools::Trim(fname);
 
     const size_t p = name.find_last_of(':');
Index: /trunk/FACT++/src/Readline.h
===================================================================
--- /trunk/FACT++/src/Readline.h	(revision 13730)
+++ /trunk/FACT++/src/Readline.h	(revision 13731)
@@ -28,4 +28,5 @@
     int fLine;
     static int fLabel;
+    static std::string fScript;
 
     // Static member function which are used to adapt readline to ncurses
@@ -102,4 +103,6 @@
     static  int  GetLabel() { return fLabel; }
 
+    static std::string GetScript() { return fScript; }
+
     int GetLine() const { return fLine; }
     virtual std::string GetLinePrompt() const;
