Index: trunk/ppStack/src/ppStackCamera.c
===================================================================
--- trunk/ppStack/src/ppStackCamera.c	(revision 14811)
+++ trunk/ppStack/src/ppStackCamera.c	(revision 14834)
@@ -229,14 +229,18 @@
     // we create a copy of the mosaicked image for psphot so we can write out a clean image
     bool mdok = false;
-    bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOM"); // perform photometry
+    bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY"); // perform photometry
     if (doPhotom) {
-        // this file is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by
+        // This file, PSPHOT.INPUT, is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by
         // psphotDefineFiles
-        pmFPAfile *psphotInput = pmFPAfileDefineFromFPA (config, output->fpa, 1, 1, "PSPHOT.INPUT");
-        PS_ASSERT (psphotInput, false);
-
-        // define associated psphot input/output files
-        if (!psphotDefineFiles (config, psphotInput)) {
-            psError(PSPHOT_ERR_CONFIG, false, "Trouble defining the additional input/output files for psphot");
+        pmFPAfile *psphotInput = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
+        if (!psphotInput) {
+            psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT"));
+            return false;
+        }
+
+        // Define associated psphot input/output files
+        if (!psphotDefineFiles(config, psphotInput)) {
+            psError(PSPHOT_ERR_CONFIG, false,
+                    "Trouble defining the additional input/output files for psphot");
             return false;
         }
