Index: trunk/ppImage/src/ppTest.c
===================================================================
--- trunk/ppImage/src/ppTest.c	(revision 6860)
+++ trunk/ppImage/src/ppTest.c	(revision 6897)
@@ -74,4 +74,5 @@
     }
 
+#if 1
     const char *outName = psMetadataLookupStr(NULL, config->arguments, "-output");
     psLogMsg("ppImage", PS_LOG_INFO, "Opening output image: %s\n", outName);
@@ -82,4 +83,5 @@
         exit(EXIT_FAILURE);
     }
+#endif
 
     // Construct camera in preparation for reading
@@ -97,15 +99,19 @@
     // Read the FPA
     psArray *chips = fpa->chips;
+    pmFPAWrite(fpa, outFile, NULL, false);
     for (int i = 0; i < chips->n; i++) {
         pmChip *chip = chips->data[i];
+        pmChipWrite(chip, outFile, NULL, false);
         psArray *cells = chip->cells;
         for (int j = 0; j < cells->n; j++) {
             pmCell *cell = cells->data[j];
-#if 0
+            pmCellWrite(cell, outFile, NULL, false);
+#if 1
             pmReadout *readout = pmReadoutAlloc(cell);
             for (int z = 0; pmReadoutReadNext(readout, inFile, z, 100); z++) {
                 do {
-//                    printf("Chip %d, Cell %d, Plane %d, row0 = %d\n", i, j, z, readout->row0);
-                    //pmFPAPrint(fpa, false, false);
+                    printf("Chip %d, Cell %d, Plane %d, row0 = %d\n", i, j, z, readout->row0);
+                    pmReadoutWriteNext(readout, outFile, z);
+                    //pmFPAPrint(fpa, false, true);
                 } while (pmReadoutReadNext(readout, inFile, z, 2048));
             }
@@ -136,8 +142,8 @@
 #endif
 
+    psFitsClose(outFile);
     psFree(view);
     psFree(fpa);
     psFree(config);
-    psFitsClose(outFile);
     psFitsClose(inFile);
     psFree(phu);
