Index: trunk/ippTools/src/dettool.c
===================================================================
--- trunk/ippTools/src/dettool.c	(revision 7299)
+++ trunk/ippTools/src/dettool.c	(revision 7302)
@@ -431,4 +431,8 @@
         return false;
     }
+    if (!det_id) {
+        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
+        return false;
+    }
     psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");
     if (!status) {
@@ -436,4 +440,8 @@
         return false;
     }
+    if (!exp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-exp_id is required");
+        return false;
+    }
     psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
     if (!status) {
@@ -441,4 +449,8 @@
         return false;
     }
+    if (!class_id) {
+        psError(PS_ERR_UNKNOWN, true, "-class_id is required");
+        return false;
+    }
     psString uri    = psMetadataLookupStr(&status, config->args, "-uri");
     if (!status) {
@@ -446,7 +458,24 @@
         return false;
     }
+    if (!uri) {
+        psError(PS_ERR_UNKNOWN, true, "-uri is required");
+        return false;
+    }
+    psString stats = psMetadataLookupStr(&status, config->args, "-stats");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stats");
+        return false;
+    }
+    if (!stats) {
+        psError(PS_ERR_UNKNOWN, true, "-stats is required");
+        return false;
+    }
     psString recipe = psMetadataLookupStr(&status, config->args, "-recipe");
     if (!status) {
         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -recipe");
+        return false;
+    }
+    if (!recipe) {
+        psError(PS_ERR_UNKNOWN, true, "-recipe is required");
         return false;
     }
@@ -473,5 +502,4 @@
 
     // create a new detProcessedImfile object
-    psString stats = ((rawImfileRow *)rawImfiles->data[0])->stats;
     detProcessedImfileRow *detRow = detProcessedImfileRowAlloc(
         (psS32)atol(det_id), exp_id, class_id, uri, stats, recipe
