Index: /trunk/ppImage/src/ppImageMosaic.c
===================================================================
--- /trunk/ppImage/src/ppImageMosaic.c	(revision 10213)
+++ /trunk/ppImage/src/ppImageMosaic.c	(revision 10214)
@@ -3,71 +3,70 @@
 #endif
 
-# include "ppImage.h"
+#include "ppImage.h"
 
-bool ppImageMosaicChip (pmConfig *config, const pmFPAview *view, char *outFile, char *inFile) {
+bool ppImageMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile)
+{
+    bool status;                        // Status of MD lookup
 
-    bool status;
-
-    pmFPAfile *in = psMetadataLookupPtr (&status, config->files, inFile);
+    pmFPAfile *in = psMetadataLookupPtr(&status, config->files, inFile); // Input file
     if (!status) {
-	psErrorStackPrint(stderr, "Can't find required I/O file!\n");
-	exit(EXIT_FAILURE);
+        psErrorStackPrint(stderr, "Can't find required I/O file!\n");
+        exit(EXIT_FAILURE);
     }
 
-    pmFPAfile *out = psMetadataLookupPtr (&status, config->files, outFile);
+    pmFPAfile *out = psMetadataLookupPtr(&status, config->files, outFile); // Output file
     if (!status) {
-	psErrorStackPrint(stderr, "Can't find required I/O file!\n");
-	exit(EXIT_FAILURE);
+        psErrorStackPrint(stderr, "Can't find required I/O file!\n");
+        exit(EXIT_FAILURE);
     }
 
-    pmFPAAddSourceFromView (out->fpa, view, out->format);
-    pmChip *outChip = pmFPAviewThisChip (view, out->fpa);
-    pmChip *inChip = pmFPAviewThisChip (view, in->fpa);
+    pmFPAAddSourceFromView(out->fpa, view, out->format);
+    pmChip *outChip = pmFPAviewThisChip(view, out->fpa);
+    pmChip *inChip = pmFPAviewThisChip(view, in->fpa);
 
+    // Copy over concepts
     if (!(out->fpa->conceptsRead & PM_CONCEPT_SOURCE_HEADER)) {
-	psMetadataCopy (out->fpa->concepts, in->fpa->concepts);
-	out->fpa->conceptsRead |= PM_CONCEPT_SOURCE_HEADER;
+        psMetadataCopy(out->fpa->concepts, in->fpa->concepts);
+        out->fpa->conceptsRead |= PM_CONCEPT_SOURCE_HEADER;
     }
 
-    psTrace ("pmChipMosaic", 5, "mosaic chip %s to %s (xbin,ybin: %d,%d to %d,%d)\n", in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin);
-    pmChipMosaic (outChip, inChip);
-
-    return true;
+    psTrace("pmChipMosaic", 5, "mosaic chip %s to %s (xbin,ybin: %d,%d to %d,%d)\n",
+            in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin);
+    return pmChipMosaic(outChip, inChip);
 }
 
-bool ppImageMosaicFPA (pmConfig *config, char *outFile, char *inFile) {
+bool ppImageMosaicFPA (pmConfig *config, char *outFile, char *inFile)
+{
+    bool status;                        // Status of MD lookup
 
-    bool status;
-
-    pmFPAfile *in = psMetadataLookupPtr (&status, config->files, inFile);
+    pmFPAfile *in = psMetadataLookupPtr(&status, config->files, inFile); // Input file
     if (!status) {
-	psErrorStackPrint(stderr, "Can't find required I/O file!\n");
-	exit(EXIT_FAILURE);
+        psErrorStackPrint(stderr, "Can't find required I/O file!\n");
+        exit(EXIT_FAILURE);
     }
 
-    pmFPAfile *out = psMetadataLookupPtr (&status, config->files, outFile);
+    pmFPAfile *out = psMetadataLookupPtr(&status, config->files, outFile); // Output file
     if (!status) {
-	psErrorStackPrint(stderr, "Can't find required I/O file!\n");
-	exit(EXIT_FAILURE);
+        psErrorStackPrint(stderr, "Can't find required I/O file!\n");
+        exit(EXIT_FAILURE);
     }
 
     // XXX test printing of all concepts
-    # if 0
+    #if 0
     for (int i = 0; i < in->fpa->chips->n; i++) {
-	pmChip *chip = in->fpa->chips->data[i];
-	for (int j = 0; j < chip->cells->n; j++) {
-	    pmCell *cell = chip->cells->data[j];
-	    psMetadataPrint (stdout, cell->concepts, 2);
-	}
+        pmChip *chip = in->fpa->chips->data[i];
+        for (int j = 0; j < chip->cells->n; j++) {
+            pmCell *cell = chip->cells->data[j];
+            psMetadataPrint(stdout, cell->concepts, 2);
+        }
     }
-    # endif
+    #endif
 
-    pmFPAview *view = pmFPAviewAlloc (0);
-    pmFPAAddSourceFromView (out->fpa, view, out->format);
+    pmFPAview *view = pmFPAviewAlloc(0);
+    pmFPAAddSourceFromView(out->fpa, view, out->format);
+    psFree(view);
 
-    psTrace ("pmFPAMosaic", 5, "mosaic fpa %s to %s (xbin,ybin: %d,%d to %d,%d)\n", in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin);
-    pmFPAMosaic (out->fpa, in->fpa);
-
-    psFree (view);
-    return true;
+    psTrace ("pmFPAMosaic", 5, "mosaic fpa %s to %s (xbin,ybin: %d,%d to %d,%d)\n",
+             in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin);
+    return pmFPAMosaic(out->fpa, in->fpa);
 }
Index: /trunk/ppImage/src/ppImageOptions.c
===================================================================
--- /trunk/ppImage/src/ppImageOptions.c	(revision 10213)
+++ /trunk/ppImage/src/ppImageOptions.c	(revision 10214)
@@ -137,5 +137,7 @@
             overscanFit = PM_FIT_SPLINE;
         } else if (strcasecmp(fit, "NONE")) {
-            psLogMsg(__func__, PS_LOG_WARN, "OVERSCAN.FIT (%s) in recipe %s is not one of NONE, POLYNOMIAL, or SPLINE", fit, RECIPE_NAME);
+            psLogMsg(__func__, PS_LOG_WARN,
+                     "OVERSCAN.FIT (%s) in recipe %s is not one of NONE, POLYNOMIAL, or SPLINE",
+                     fit, RECIPE_NAME);
             exit(EXIT_FAILURE);
         }
@@ -149,5 +151,6 @@
             overscanStats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN);
         } else {
-            psErrorStackPrint(stderr, "OVERSCAN.STAT (%s) in recipe %s is not one of MEAN or MEDIAN", stat, RECIPE_NAME);
+            psErrorStackPrint(stderr, "OVERSCAN.STAT (%s) in recipe %s is not one of MEAN or MEDIAN",
+                              stat, RECIPE_NAME);
             exit(EXIT_FAILURE);
         }
@@ -173,12 +176,24 @@
     // binned image options
     options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN");
-    if (!status) options->xBin1 = 16;
+    if (!status) {
+        psWarning("BIN1.XBIN not found in recipe: setting to default value.\n");
+        options->xBin1 = 16;
+    }
     options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN");
-    if (!status) options->yBin1 = 16;
+    if (!status) {
+        psWarning("BIN1.YBIN not found in recipe: setting to default value.\n");
+        options->yBin1 = 16;
+    }
 
     options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN");
-    if (!status) options->xBin1 = 16;
+    if (!status) {
+        psWarning("BIN2.XBIN not found in recipe: setting to default value.\n");
+       options->xBin1 = 16;
+    }
     options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN");
-    if (!status) options->yBin1 = 16;
+    if (!status) {
+        psWarning("BIN2.YBIN not found in recipe: setting to default value.\n");
+        options->yBin1 = 16;
+    }
 
     options->BaseFITS = psMetadataLookupBool(NULL, recipe, "BASE.FITS");
@@ -196,5 +211,5 @@
     options->doAstromMosaic = psMetadataLookupBool(NULL, recipe, "ASTROM.MOSAIC");
     if ((options->doAstromChip || options->doAstromMosaic) && !options->doPhotom) {
-        psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot do ASTROMetry without PHOTOMetry");
+        psLogMsg(__func__, PS_LOG_ERROR, "Invalid PPIMAGE options: cannot do ASTROMetry without PHOTOMetry");
         exit(EXIT_FAILURE);
     }
@@ -202,5 +217,5 @@
     options->doAddstar = psMetadataLookupBool(NULL, recipe, "ADDSTAR");
     if (options->doAddstar && !(options->doAstromChip || options->doAstromMosaic)) {
-        psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot Addstar without Astrometry");
+        psLogMsg(__func__, PS_LOG_ERROR, "Invalid PPIMAGE options: cannot Addstar without Astrometry");
         exit(EXIT_FAILURE);
     }
