Index: trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- trunk/ppImage/src/ppImageParseCamera.c	(revision 6114)
+++ trunk/ppImage/src/ppImageParseCamera.c	(revision 6125)
@@ -56,4 +56,12 @@
     data->fringe->fpa  = pmFPAConstruct(config->camera);
 
+    // Open output file
+    const char *outname = psMetadataLookupStr(NULL, config->arguments, "-output"); // Name of output file
+    data->output = psFitsOpen(outname, "w"); // File for writing
+    if (! data->output) {
+        psError(PS_ERR_IO, false, "Unable to open output file %s.\n", data->output);
+        exit(EXIT_FAILURE);
+    }
+
     // XXX EAM : extend this to allow an array of selected chips by name
     // Chip selection: if we are using a single chip, select it for each FPA
