Index: trunk/ippToPsps/src/StackBatch.c
===================================================================
--- trunk/ippToPsps/src/StackBatch.c	(revision 31025)
+++ trunk/ippToPsps/src/StackBatch.c	(revision 31030)
@@ -62,4 +62,9 @@
     long unmatched = 0, totalDetections = 0, numOfDuplicates = 0, numInvalidFlux = 0, numDetectionsOut = 0;
 
+    this->base.logger->print(this->base.logger, MSG_INFO,
+            "+---------------+---------+----------+------------------+---------------+--------------+\n");
+    this->base.logger->print(this->base.logger, MSG_INFO,
+            "|   Extension   | Rows in | Rows out | Missing from DVO | Duplicate IDs | Invalid Flux |\n");
+
     for (long s=0; s<nDet; s++) {
 
@@ -102,9 +107,10 @@
 
     }
-    psLogMsg("ippToPsps", PS_LOG_INFO,
-            "+---------------+---------+----------+------------------+---------------+--------------+\n"
-            "|   Extension   | Rows in | Rows out | Missing from DVO | Duplicate IDs | Invalid Flux |\n"
+
+    this->base.logger->print(this->base.logger, MSG_INFO,
             "|  %12s |  %5ld  |   %5ld  |      %5ld       |    %5ld      |    %5ld     |\n",
             extensionName, nDet, numDetectionsOut, unmatched, numOfDuplicates, numInvalidFlux);
+    this->base.logger->print(this->base.logger, MSG_INFO,
+            "+---------------+---------+----------+------------------+---------------+--------------+\n");
 
 
@@ -315,5 +321,5 @@
 
     // open input FITS file
-    Fits* fitsIn = existing_Fits(this->base.inputFiles[0]);
+    Fits* fitsIn = existing_Fits(this->base.inputFiles[0], this->base.logger);
     if (fitsIn->getFilePtr(fitsIn) == NULL)  return PS_EXIT_SYS_ERROR;
 
@@ -425,14 +431,11 @@
   Constructor
   */
-StackBatch* new_StackBatch(int *argc, char **argv) {
-
+StackBatch* new_StackBatch(Logger* logger, int *argc, char **argv) {
+
+    logger->print(logger, MSG_DEBUG, "StackBatch: Constructor\n");
     StackBatch *this = (StackBatch*)calloc(1, sizeof(StackBatch));
 
     // call base-class constructor
-    if (!new_Batch(&this->base)) {
-
-        psError(PS_ERR_IO, false, "Unable to create Batch base-class object");
-        return this;
-    }
+    new_Batch(logger, &this->base);
 
     this->MAXDETECT = 150000;
@@ -455,9 +458,11 @@
     psTimerStart("stackbatch");
 
-    ippToPsps_VersionPrint();
+//    ippToPsps_VersionPrint();
 
     int exitCode;
 
-    StackBatch* stackBatch = new_StackBatch(&argc, argv);
+    Logger* logger = new_Logger(NULL);
+
+    StackBatch* stackBatch = new_StackBatch(logger, &argc, argv);
     stackBatch->base.run(stackBatch);
     exitCode = stackBatch->base.exitCode;
@@ -467,5 +472,5 @@
     double secs = psTimerMark("stackbatch");
 
-    psLogMsg("stackbatch", 3, "stackbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",
+    logger->print(logger, MSG_INFO, "stackbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",
             (exitCode == PS_EXIT_SUCCESS) ? "" : "un",
             exitCode,
@@ -476,4 +481,5 @@
     psTimerStop();
     psLibFinalize();
+    logger->destroy(logger);
 
     return exitCode;
