Index: trunk/ippTools/src/regtool.c
===================================================================
--- trunk/ippTools/src/regtool.c	(revision 30556)
+++ trunk/ippTools/src/regtool.c	(revision 30582)
@@ -211,5 +211,5 @@
   // convert regular class_id format to summitImfile.class_id format
   rep = psStringCopy(class_id);
-  psFree(class_id);
+
   class_id = rep;
   
@@ -320,5 +320,5 @@
   psStringSubstitute(&query,dateobs_end,"@DATEOBS_END@");
 
-  // fprintf(stderr,"%s",query);
+   fprintf(stderr,"%s",query);
 
   if (!p_psDBRunQuery(config->dbh, query)) {
@@ -345,5 +345,5 @@
   }
 
-  // fprintf (stderr, "found %ld rows\n", output->n);
+  fprintf (stderr, "found %ld rows\n", output->n);
   if (!psArrayLength(output)) {
     psTrace("regtool", PS_LOG_INFO, "no rows found");
@@ -370,5 +370,5 @@
     char *tmp_id = psMetadataLookupStr(&status,row,"summit_class_id");
     if (!status) {
-      //      fprintf (stderr, "incomplete on %s\n", psMetadataLookupStr(NULL,row,"exp_name"));
+            fprintf (stderr, "incomplete on %s\n", psMetadataLookupStr(NULL,row,"exp_name"));
         continue;
     }
@@ -440,5 +440,5 @@
         already_burned = false;
 
-	//	fprintf (stderr, "missing uri: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id);
+	fprintf (stderr, "missing uri: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id);
 
         // Save this round for next round.
@@ -1903,7 +1903,7 @@
   psFree(query);
   query = rep;
-  psStringSubstitute(&class_id,"ota","XY");
   psStringSubstitute(&query,class_id,"@CLASS_ID@");
-    
+  psStringSubstitute(&query,"ota","XY");
+  
   if (!date) {
     if (!dateobs_begin || !dateobs_end) {
