Index: trunk/ppImage/src/ppImage.c
===================================================================
--- trunk/ppImage/src/ppImage.c	(revision 7581)
+++ trunk/ppImage/src/ppImage.c	(revision 7639)
@@ -35,2 +35,49 @@
     return EXIT_SUCCESS;
 }
+
+void ppImageFileCheck (pmConfig *config) {
+
+    // add the output names to the output-type files
+    psMetadataItem *item = NULL;
+    psMetadataIterator *iter = psMetadataIteratorAlloc (config->files, PS_LIST_HEAD, NULL);
+    while ((item = psMetadataGetAndIncrement (iter)) != NULL) {
+	pmFPAfile *file = item->data.V;
+	pmFPA *fpa = file->fpa;
+	fprintf (stderr, "file %s\n", file->name);
+	if (!fpa) {
+	    fprintf (stderr, "  has no FPA\n");
+	    continue;
+	}
+	if (fpa->hdu) {
+	    if (fpa->hdu->images) fprintf (stderr, "  (%d,%d) images\n", -1, -1);
+	    if (fpa->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", -1, -1);
+	    if (fpa->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", -1, -1);
+	    if (fpa->hdu->header) fprintf (stderr, "  (%d,%d) header\n", -1, -1);
+	    continue;
+	}
+	fprintf (stderr, "  has no fpa data (%d,%d)\n", -1, -1);
+	for (int i = 0; i < fpa->chips->n; i++) {
+	    pmChip *chip = fpa->chips->data[i];
+	    if (chip->hdu) {
+		if (chip->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, -1);
+		if (chip->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, -1);
+		if (chip->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, -1);
+		if (chip->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, -1);
+		continue;
+	    }
+	    fprintf (stderr, "  has no chip data (%d,%d)\n", i, -1);
+	    for (int j = 0; j < chip->cells->n; j++) {
+		pmCell *cell = chip->cells->data[j];
+		if (cell->hdu) {
+		    if (cell->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, j);
+		    if (cell->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, j);
+		    if (cell->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, j);
+		    if (cell->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, j);
+		    continue;
+		}
+		fprintf (stderr, "  has no cell data (%d,%d)\n", i, j);
+	    }
+	}
+    }
+    psFree (iter);
+}
