Index: trunk/ppImage/src/ppFocus.c
===================================================================
--- trunk/ppImage/src/ppFocus.c	(revision 7738)
+++ trunk/ppImage/src/ppFocus.c	(revision 7749)
@@ -17,12 +17,4 @@
     }
 
-    // define recipe options
-    // define the active I/O files
-    ppImageOptions *options = ppFocusParseCamera(config);
-    if (options == NULL) {
-        psErrorStackPrint(stderr, "");
-        exit(1);
-    }
-    
     // we search the argument data for the named fileset (argname)
     psArray *infiles = psMetadataLookupPtr(NULL, config->arguments, "INPUT");
@@ -38,5 +30,14 @@
     for (int i = 0; i < infiles->n; i++) {
 
+	// define recipe options
+	// define the active I/O files
+	ppImageOptions *options = ppFocusParseCamera(config, i);
+	if (options == NULL) {
+	    psErrorStackPrint(stderr, "");
+	    exit(1);
+	}
+
 	// Image Arithmetic Loop
+	// XXX ppFocus REQUIRES photom: for it to be true?
 	if (!ppImageLoop(config, options)) {
 	    psErrorStackPrint(stderr, "");
@@ -48,6 +49,6 @@
 	ppFocusGetFWHM (config, focus, fwhm);
 
-	// silently ignore failure for (i == infiles->n)
-	pmFPAfileDefineSingleFromArgs (NULL, config, "PPIMAGE.INPUT", "INPUT", i+1);
+	ppFocusDropCamera (config);
+	psFree (options);
     }
 
@@ -57,5 +58,5 @@
 
     // Cleaning up
-    ppImageCleanup(config, options);
+    ppImageCleanup(config, NULL);
     return EXIT_SUCCESS;
 }
