Index: /branches/end_stage/ippTools/src/chiptool.c
===================================================================
--- /branches/end_stage/ippTools/src/chiptool.c	(revision 16151)
+++ /branches/end_stage/ippTools/src/chiptool.c	(revision 16152)
@@ -338,5 +338,5 @@
     }
 
-    chipProcessedImfileRow *imfile = chipProcessedImfileRowAlloc(
+    if (!chipProcessedImfileInsert(config->dbh,
         (psS64)atoll(chip_id),
         (psS64)atoll(exp_id),
@@ -363,24 +363,12 @@
         path_base,
         code
-    );
-    if (!imfile) {
+    )) {
         // rollback
         if (!psDBRollback(config->dbh)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
         }
-        psError(PS_ERR_UNKNOWN, false, "failed to alloc chipProcessedImfileRow object");
-        return false;
-    }
-    if (!chipProcessedImfileInsertObject(config->dbh, imfile)) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        psFree(imfile);
-        return false;
-    }
-
-
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
 
     // XXX I've decided to make the transaction cover the Exp migration as
@@ -644,4 +632,11 @@
             return false;
         }
+
+        // should we stop here or proceed on to the cam stage?
+        if (psStrcasestr(chipRun->end_stage, "chip")) {
+            psFree(chipRun);
+            continue;
+        }
+        // else continue on...
 
         // camQueueChipID() can only be run after chipRun.state has been set to
