Index: branches/tap_branches/ippTools/src/pztool.c
===================================================================
--- branches/tap_branches/ippTools/src/pztool.c	(revision 25900)
+++ branches/tap_branches/ippTools/src/pztool.c	(revision 27838)
@@ -117,5 +117,6 @@
             telescope,
             uri,
-            NULL  // epoch
+            NULL,  // epoch
+            0      // use_compress
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -304,5 +305,5 @@
     psArray *cameras = pzGetPendingCameras(config);
     if (!cameras) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to find any cameras");
+        psError(PXTOOLS_ERR_CONFIG, false, "failed to find any cameras");
         return false;
     }
@@ -314,5 +315,5 @@
         psString query = pxDataGet("pztool_pendingimfile.sql");
         if (!query) {
-            psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
             psFree(cameraImfiles);
             return false;
@@ -492,5 +493,5 @@
     psString query = pxDataGet("pztool_find_completed_exp.sql");
     if (!query) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
         return false;
     }
@@ -783,5 +784,5 @@
     psMetadata *where = psMetadataAlloc();
     PXOPT_COPY_STR(config->args, where,  "-exp_name", "exp_name", "==");
-    PXOPT_COPY_STR(config->args, where, "-inst", "inst", "==");
+    PXOPT_COPY_STR(config->args, where, "-inst", "camera", "==");
     PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "==");
     PXOPT_COPY_STR(config->args, where,  "-class", "class", "==");
@@ -807,5 +808,5 @@
     psMetadata *where = psMetadataAlloc();
     PXOPT_COPY_STR(config->args, where,  "-exp_name", "exp_name", "==");
-    PXOPT_COPY_STR(config->args, where, "-inst", "inst", "==");
+    PXOPT_COPY_STR(config->args, where, "-inst", "camera", "==");
     PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "==");
     PXOPT_COPY_STR(config->args, where,  "-class", "class", "==");
@@ -814,5 +815,5 @@
     psString query = pxDataGet("pztool_revertcopied.sql");
     if (!query) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
         return false;
     }
@@ -848,5 +849,5 @@
     psString query = pxDataGet("pztool_revert_downloadimfile_faults.sql");
     if (!query) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
         return false;
     }
@@ -863,5 +864,5 @@
     psString query = pxDataGet("pztool_revert_fileset_faults.sql");
     if (!query) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
         return false;
     }
