Index: trunk/ppStack/src/ppStackCamera.c
===================================================================
--- trunk/ppStack/src/ppStackCamera.c	(revision 16829)
+++ trunk/ppStack/src/ppStackCamera.c	(revision 16831)
@@ -72,5 +72,4 @@
 {
     bool haveWeights = false;           // Do we have weight maps?
-    bool havePSFs = false;              // Do we have PSFs?
 
     psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); // The inputs info
@@ -168,7 +167,9 @@
         }
 
-        // Optionally add the psf file
-        if (psf && strlen(psf) > 0) {
-            havePSFs = true;
+        // Add the psf file
+        if (!psf || strlen(psf) == 0) {
+            psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF %d", i);
+            return false;
+        } else {
             psArray *psfFiles = psArrayAlloc(1); // Array of filenames for this FPA
             psfFiles->data[0] = psMemIncrRefCounter(psf);
@@ -315,30 +316,4 @@
 
 
-    // Output PSF
-    if (havePSFs) {
-        pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE");
-        if (!outPSF) {
-            psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE"));
-            return false;
-        }
-        if (outPSF->type != PM_FPA_FILE_PSF) {
-            psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF");
-            return false;
-        }
-        outPSF->save = true;
-    }
-
-    // Sources for use as stamps
-    bool status = false;                // Found the file?
-    pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES");
-    if (!status) {
-        psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES");
-        return false;
-    }
-    if (sources && sources->type != PM_FPA_FILE_CMF) {
-        psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF");
-        return false;
-    }
-
     // For photometry, we operate on the chip-mosaicked image
     // we create a copy of the mosaicked image for psphot so we can write out a clean image
@@ -360,4 +335,28 @@
             return false;
         }
+    } else {
+        // Output PSF --- only required if photometry is not being performed
+        pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE");
+        if (!outPSF) {
+            psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE"));
+            return false;
+        }
+        if (outPSF->type != PM_FPA_FILE_PSF) {
+            psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF");
+            return false;
+        }
+        outPSF->save = true;
+    }
+
+    // Sources for use as stamps
+    bool status = false;                // Found the file?
+    pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES");
+    if (!status) {
+        psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES");
+        return false;
+    }
+    if (sources && sources->type != PM_FPA_FILE_CMF) {
+        psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF");
+        return false;
     }
 
