Index: trunk/psastro/src/psastroDataLoad.c
===================================================================
--- trunk/psastro/src/psastroDataLoad.c	(revision 12806)
+++ trunk/psastro/src/psastroDataLoad.c	(revision 15216)
@@ -5,4 +5,10 @@
 // into the correct fpa structure locations (readout.analysis:PSPHOT.SOURCES)
 
+# define ESCAPE { \
+  psError(PS_ERR_UNKNOWN, false, "Failure in psastroDataSave"); \
+  psFree (view); \
+  return false; \
+}
+  
 // all of the different astrometry analysis modes use the same data load loop
 bool psastroDataLoad (pmConfig *config) {
@@ -33,30 +39,31 @@
 
     // files associated with the science image
-    pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
+    if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
 
     while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
         psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
         if (!chip->process || !chip->file_exists) { continue; }
-	pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
+	if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
 
 	while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
             psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
             if (!cell->process || !cell->file_exists) { continue; }
-	    pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
+	    if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
 
 	    // process each of the readouts
 	    while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
-		pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
-		if (! readout->data_exists) { continue; }
+		if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE;
+		if (!readout->data_exists) { continue; }
 
-		psastroConvertReadout (readout, recipe);
+		if (!psastroConvertReadout (readout, recipe)) ESCAPE;
 
-		pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
+		if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
 	    }
-	    pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
+	    if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
 	}
-	pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
+	if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
     }
-    pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
+    if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE;
+
     psFree (view);
     return true;
