Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 12428)
+++ /trunk/ippTools/src/dettool.c	(revision 12429)
@@ -242,11 +242,8 @@
     }
 
+    // optional
     psString filelevel = psMetadataLookupStr(&status, config->args, "-filelevel");
     if (!status) {
         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -filelevel");
-        return false;
-    }
-    if (!filelevel) {
-        psError(PS_ERR_UNKNOWN, true, "-filelevel is required");
         return false;
     }
@@ -501,4 +498,9 @@
         psAbort(    "an -exp_tag matched more then one rawExp (this should not happen");
 
+    }
+
+    // check to see if -filelevel was set on the command line
+    if (!filelevel) {
+        filelevel = psStringCopy(((rawExpRow *)detrendExps->data[0])->filelevel);
     }
 
@@ -672,11 +674,8 @@
     }
 
+    // optional
     psString filelevel = psMetadataLookupStr(&status, config->args, "-filelevel");
     if (!status) {
         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -filelevel");
-        return false;
-    }
-    if (!filelevel) {
-        psError(PS_ERR_UNKNOWN, true, "-filelevel is required");
         return false;
     }
@@ -1146,4 +1145,9 @@
         psFree(use_end);
         return true;
+    }
+
+    // check to see if -filelevel was set on the command line
+    if (!filelevel) {
+        filelevel = psStringCopy(((rawExpRow *)detrendExps->data[0])->filelevel);
     }
 
