Index: trunk/ppSim/src/ppSimLoop.c
===================================================================
--- trunk/ppSim/src/ppSimLoop.c	(revision 24486)
+++ trunk/ppSim/src/ppSimLoop.c	(revision 25760)
@@ -30,4 +30,9 @@
     ppSimType type = ppSimTypeFromString (typeStr); // Type of image to simulate
     int binning = psMetadataLookupS32(NULL, recipe, "BINNING"); // Binning in x and y
+
+    ppSimUpdateConceptsFPA (fpa, config);
+    if (fpa->hdu) { // XXX only do this if there is no INPUT image
+        if (!ppSimInitHeader(config, fpa, NULL, NULL)) ESCAPE (PS_ERR_UNKNOWN, "problem setting output header");
+    }
 
     psArray *stars = psArrayAllocEmpty (1);
@@ -57,9 +62,4 @@
         psFree(view);
         return false;
-    }
-
-    ppSimUpdateConceptsFPA (fpa, config);
-    if (fpa->hdu) { // XXX only do this if there is no INPUT image
-        if (!ppSimInitHeader(config, fpa, NULL, NULL)) ESCAPE (PS_ERR_UNKNOWN, "problem setting output header");
     }
 
