Index: trunk/ippTools/share/fftool_summary.sql
===================================================================
--- trunk/ippTools/share/fftool_summary.sql	(revision 38943)
+++ trunk/ippTools/share/fftool_summary.sql	(revision 39028)
@@ -8,4 +8,5 @@
     fullForceRun.sources_path_base,
     'summary' AS dist_component,
+    stackRun.stack_id,
     stackRun.tess_id,
     stackRun.skycell_id,
Index: trunk/ippTools/src/addtool.c
===================================================================
--- trunk/ippTools/src/addtool.c	(revision 38943)
+++ trunk/ippTools/src/addtool.c	(revision 39028)
@@ -421,5 +421,5 @@
       psStringAppend(&query, " GROUP BY ff_id ");  //needs to be checked, but should be fine: want 1 ff summary cmf.
     }
-    psError(PS_ERR_UNKNOWN, false , query);
+    psError(PS_ERR_UNKNOWN, false, "query: %s\n", query);
 
     psTrace("addtool.c", PS_LOG_INFO,"query: \n\n%s\n\n",query);
@@ -1199,9 +1199,11 @@
     psMetadata *where = psMetadataAlloc();
     if (multiadd) {
-      //required, check that they are there
-      PXOPT_LOOKUP_STR(multiaddlabel, config->args, "-multiaddlabel",true,false);
-      PXOPT_LOOKUP_STR(stage, config->args, "-stage",true,false);
-      PXOPT_LOOKUP_S64(stage_id, config->args, "-stage_id",true,false);
-      //do the where
+      // NOTE: these tests are not needed because the PXOPT_COPY_* calls below return FALSE on failure to find the item
+      // required, check that they are there
+      // PXOPT_LOOKUP_STR(multiaddlabel, config->args, "-multiaddlabel", true, false);
+      // PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
+      // PXOPT_LOOKUP_S64(stage_id, config->args, "-stage_id", true, false);
+
+      // do the where
       PXOPT_COPY_STR(config->args, where, "-multiaddlabel",   "addRun.label",   "==");
       PXOPT_COPY_STR(config->args, where, "-stage", "addRun.stage","==");
@@ -1211,5 +1213,5 @@
       //if not multiadd mode, then do it by add_id
       // required, check for add_id
-      PXOPT_LOOKUP_S64(add_id, config->args, "-add_id",true,false);
+      // PXOPT_LOOKUP_S64(add_id, config->args, "-add_id",true,false);
       PXOPT_COPY_S64(config->args, where, "-add_id",   "addRun.add_id",   "==");
       
Index: trunk/ippTools/src/fftool.c
===================================================================
--- trunk/ippTools/src/fftool.c	(revision 38943)
+++ trunk/ippTools/src/fftool.c	(revision 39028)
@@ -46,5 +46,4 @@
 static bool exportrunMode(pxConfig *config);
 static bool importrunMode(pxConfig *config);
-static bool summaryMode(pxConfig *config);
 
 static bool setfullForceRunState(pxConfig *config, psS64 sky_id, const char *state);
