Index: /trunk/ppStats/src/ppStatsStandAlone.c
===================================================================
--- /trunk/ppStats/src/ppStatsStandAlone.c	(revision 10982)
+++ /trunk/ppStats/src/ppStatsStandAlone.c	(revision 10983)
@@ -15,5 +15,5 @@
 int main(int argc, char *argv[])
 {
-    int status = EXIT_SUCCESS;
+    psExit status = PS_EXIT_SUCCESS;
 
     psLibInit(NULL);
@@ -22,7 +22,15 @@
     // Parse the configuration and arguments
     pmConfig *config = pmConfigRead(&argc, argv, PPSTATS_RECIPE);
+    if (!config) {
+        psError(PS_ERR_UNKNOWN, false, "Unable to read configuration.\n");
+        exit(PS_EXIT_CONFIG_ERROR);
+    }
 
     // Get the options, open the files
     ppStatsData *data = ppStatsSetupFromArgs(config);
+    if (!data) {
+        psError(PS_ERR_UNKNOWN, false, "Unable to parse command-line arguments.\n");
+        exit(PS_EXIT_CONFIG_ERROR);
+    }
 
     // Output filename is optional
@@ -35,10 +43,10 @@
             if (!outFile) {
                 psLogMsg("ppStats", PS_LOG_ERROR, "Unable to open output file %s\n", outName);
-                status = EXIT_FAILURE;
+                status = PS_EXIT_DATA_ERROR;
                 goto die;
             }
         } else {
             psLogMsg("ppStats", PS_LOG_ERROR, "Unable to open output file.\n");
-            status = EXIT_FAILURE;
+            status = PS_EXIT_DATA_ERROR;
             goto die;
         }
@@ -51,5 +59,5 @@
         psLogMsg("ppStats", PS_LOG_ERROR, "No output.\n");
         psFree(results);
-        status = EXIT_FAILURE;
+        status = PS_EXIT_UNKNOWN_ERROR;
         goto die;
     }
@@ -60,5 +68,5 @@
         psLogMsg("ppStats", PS_LOG_ERROR, "Unable to generate configuration file with result.\n");
         psFree(results);
-        status = EXIT_FAILURE;
+        status = PS_EXIT_SYS_ERROR;
         goto die;
     }
