Index: trunk/pswarp/src/pswarpParseCamera.c
===================================================================
--- trunk/pswarp/src/pswarpParseCamera.c	(revision 10952)
+++ trunk/pswarp/src/pswarpParseCamera.c	(revision 10954)
@@ -3,9 +3,10 @@
 bool pswarpParseCamera (pmConfig *config) {
 
-    bool status = false;
+    bool status;
 
     // the input image(s) are required arguments; they define the camera
+    status = false;
     pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "PSWARP.INPUT", "INPUT");
-    if (!status) {
+    if (!input) {
 	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.INPUT");
 	return false;
@@ -13,11 +14,13 @@
 
     // the input skycell is a required argument: it defines the output image
+    status = false;
     pmFPAfile *skycell = pmFPAfileDefineFromArgs (&status, config, "PSWARP.SKYCELL", "SKYCELL");
-    if (!status) {
-	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.INPUT");
+    if (!skycell) {
+	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");
 	return false;
     }
 
     // the mask is not required; the  skycell is a required argument: it defines the output image
+    status = false;
     pmFPAfileDefineFromArgs (&status, config, "PSWARP.MASK", "MASK");
     if (!status) {
@@ -26,4 +29,5 @@
 
     // the weight is not required; the  skycell is a required argument: it defines the output image
+    status = false;
     pmFPAfileDefineFromArgs (&status, config, "PSWARP.WEIGHT", "WEIGHT");
     if (!status) {
@@ -32,5 +36,8 @@
 
     // these calls bind the I/O handle to the specified fpa
-    pmFPAfileDefineOutput (config, skycell->fpa, "PSWARP.OUTPUT");
+    if (!pmFPAfileDefineOutput (config, skycell->fpa, "PSWARP.OUTPUT")) {
+	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");
+	return false;
+    }
 
     // Chip selection: turn on only the chips specified
