Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision f4bd01c2def3fb661cc9b90940415de28b290f9b)
+++ src/builder.cpp	(revision 9d2a9276f94fe257f7259e9ad59fcd484a8722c2)
@@ -1530,8 +1530,13 @@
             break;
           case 'v':
-            setVerbosity(atoi(argv[argptr]));
-            ArgcList.insert(argptr-1);
-            ArgcList.insert(argptr);
-            argptr++;
+            if ((argptr >= argc) || (argv[argptr][0] == '-')) {
+              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for specifying verbosity: -v <level>" << endl);
+              performCriticalExit();
+            } else {
+              setVerbosity(atoi(argv[argptr]));
+              ArgcList.insert(argptr-1);
+              ArgcList.insert(argptr);
+              argptr++;
+            }
             break;
           case 'V':
@@ -1540,13 +1545,18 @@
             break;
           case 'B':
-            ArgcList.insert(argptr-1);
-            ArgcList.insert(argptr);
-            ArgcList.insert(argptr+1);
-            ArgcList.insert(argptr+2);
-            ArgcList.insert(argptr+3);
-            ArgcList.insert(argptr+4);
-            ArgcList.insert(argptr+5);
-            argptr+=6;
             if (ExitFlag == 0) ExitFlag = 1;
+            if ((argptr+5 >= argc)) {
+              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments for setting Box: -B <xx> <<xy> <<xz> <yy> <yz> <zz>" << endl);
+              performCriticalExit();
+            } else {
+              ArgcList.insert(argptr-1);
+              ArgcList.insert(argptr);
+              ArgcList.insert(argptr+1);
+              ArgcList.insert(argptr+2);
+              ArgcList.insert(argptr+3);
+              ArgcList.insert(argptr+4);
+              ArgcList.insert(argptr+5);
+              argptr+=6;
+            }
             break;
           case 'e':
@@ -1582,12 +1592,24 @@
             break;
           case 'n':
-            ArgcList.insert(argptr-1);
-            ArgcList.insert(argptr);
-            argptr+=1;
+            if ((argptr >= argc) || (argv[argptr][0] == '-')) {
+              ExitFlag = 255;
+              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting fast-parsing: -n <0/1>" << endl);
+              performCriticalExit();
+            } else {
+              ArgcList.insert(argptr-1);
+              ArgcList.insert(argptr);
+              argptr+=1;
+            }
             break;
           case 'X':
-            ArgcList.insert(argptr-1);
-            ArgcList.insert(argptr);
-            argptr+=1;
+            if ((argptr >= argc) || (argv[argptr][0] == '-')) {
+              ExitFlag = 255;
+              DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting default molecule name: -X <name>" << endl);
+              performCriticalExit();
+            } else {
+              ArgcList.insert(argptr-1);
+              ArgcList.insert(argptr);
+              argptr+=1;
+            }
             break;
           default:   // no match? Step on
@@ -1703,7 +1725,13 @@
             case 'D':
               if (ExitFlag == 0) ExitFlag = 1;
-              ArgcList.insert(argptr-1);
-              ArgcList.insert(argptr);
-              argptr+=1;
+              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
+                ExitFlag = 255;
+                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for depth-first-search analysis: -D <max. bond distance>" << endl);
+                performCriticalExit();
+              } else {
+                ArgcList.insert(argptr-1);
+                ArgcList.insert(argptr);
+                argptr+=1;
+              }
               break;
             case 'I':
@@ -1727,6 +1755,4 @@
             case 'C':
               {
-                int ranges[3] = {1, 1, 1};
-                bool periodic = (argv[argptr-1][2] =='p');
                 if (ExitFlag == 0) ExitFlag = 1;
                 if ((argptr+11 >= argc)) {
@@ -1818,19 +1844,25 @@
             case 'F':
               if (ExitFlag == 0) ExitFlag = 1;
-              ArgcList.insert(argptr-1);
-              ArgcList.insert(argptr);
-              ArgcList.insert(argptr+1);
-              ArgcList.insert(argptr+2);
-              ArgcList.insert(argptr+3);
-              ArgcList.insert(argptr+4);
-              ArgcList.insert(argptr+5);
-              ArgcList.insert(argptr+6);
-              ArgcList.insert(argptr+7);
-              ArgcList.insert(argptr+8);
-              ArgcList.insert(argptr+9);
-              ArgcList.insert(argptr+10);
-              ArgcList.insert(argptr+11);
-              ArgcList.insert(argptr+12);
-              argptr+=13;
+              if ((argptr+12 >= argc) || (argv[argptr][0] == '-')) {
+                ExitFlag = 255;
+                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for filling with molecule: -F <filler xyz file> --MaxDistance <distance or -1> --distances <x> <y> <z>  --lengths <surface> <randatm> <randmol> --DoRotate <0/1>" << endl);
+                performCriticalExit();
+              } else {
+                ArgcList.insert(argptr-1);
+                ArgcList.insert(argptr);
+                ArgcList.insert(argptr+1);
+                ArgcList.insert(argptr+2);
+                ArgcList.insert(argptr+3);
+                ArgcList.insert(argptr+4);
+                ArgcList.insert(argptr+5);
+                ArgcList.insert(argptr+6);
+                ArgcList.insert(argptr+7);
+                ArgcList.insert(argptr+8);
+                ArgcList.insert(argptr+9);
+                ArgcList.insert(argptr+10);
+                ArgcList.insert(argptr+11);
+                ArgcList.insert(argptr+12);
+                argptr+=13;
+              }
               break;
             case 'A':
