Index: trunk/ippTools/src/regtool.c
===================================================================
--- trunk/ippTools/src/regtool.c	(revision 27131)
+++ trunk/ippTools/src/regtool.c	(revision 27132)
@@ -347,9 +347,9 @@
     psString where2 = NULL;
     if (!pxmagicAddWhere(config, &where2, "rawImfile")) {
-        psError(psErrorCodeLast(), false, "pxSpaceAddWhere failed");
+        psError(psErrorCodeLast(), false, "pxmagicAddWhere failed");
         return false;
     }
     if (!pxspaceAddWhere(config, &where2, "rawImfile")) {
-        psError(psErrorCodeLast(), false, "pxSpaceAddWhere failed");
+        psError(psErrorCodeLast(), false, "pxspaceAddWhere failed");
         return false;
     }
@@ -965,4 +965,10 @@
     PXOPT_COPY_F32(config->args,   where,  "-sun_angle_max", "sun_angle", "<");
 
+    psString where2 = NULL;
+    if (!pxspaceAddWhere(config, &where2, "rawExp")) {
+        psError(psErrorCodeLast(), false, "pxSpaceAddWhere failed");
+        return false;
+    }
+
     PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
@@ -973,6 +979,11 @@
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
-    }
+    } 
     psFree(where);
+
+    if (where2) {
+        psStringAppend(&query, " %s ", where2);
+        psFree(where2);
+    }
 
     if (faulted) {
