Index: trunk/ppStats/src/ppStats.c
===================================================================
--- trunk/ppStats/src/ppStats.c	(revision 8749)
+++ trunk/ppStats/src/ppStats.c	(revision 13640)
@@ -15,4 +15,6 @@
     )
 {
+    psExit status;
+
     // Get the options, open the files
     ppStatsData *data = ppStatsSetupFromRecipe(NULL, config);
@@ -29,8 +31,13 @@
 
     // Go through the FPA and do the hard work
-    out = ppStatsLoop(out, data, config);
+    psMetadata *result = ppStatsLoop(&status, out, data, config);
+    if (status != PS_EXIT_SUCCESS) {
+	psError (PS_ERR_UNKNOWN, false, "trouble getting stats\n");
+        psFree(result);
+	psFree(data);
+	return (NULL);
+    }
 
     psFree(data);
-
-    return out;
+    return result;
 }
