Index: /trunk/ppMerge/src/ppMerge.c
===================================================================
--- /trunk/ppMerge/src/ppMerge.c	(revision 15475)
+++ /trunk/ppMerge/src/ppMerge.c	(revision 15476)
@@ -35,12 +35,20 @@
     // Construct camera in preparation for reading
     pmConfig *config = ppMergeConfig(argc, argv);
+    if (!config) {
+        psErrorStackPrint(stderr, "Unable to get configuration.");
+        exit(EXIT_FAILURE);
+    }
 
     // Set various tasks (define optional operations)
     ppMergeOptions *options = ppMergeOptionsParse(config);
+    if (!options) {
+        psErrorStackPrint(stderr, "Unable to parse options.");
+        exit(EXIT_FAILURE);
+    }
 
     // Check the inputs
     ppMergeData *data = ppMergeCheckInputs(options, config);
     if (!data) {
-        psError(PS_ERR_IO, false, "Not enough valid input files.\n");
+        psErrorStackPrint(stderr, "Not enough valid input files.");
         exit(EXIT_FAILURE);
     }
Index: /trunk/ppMerge/src/ppMergeOptions.c
===================================================================
--- /trunk/ppMerge/src/ppMergeOptions.c	(revision 15475)
+++ /trunk/ppMerge/src/ppMergeOptions.c	(revision 15476)
@@ -215,5 +215,7 @@
             options->shutter = true;
             options->mask = false;
-        } else if (strcasecmp(type, "MASK") == 0) {
+        } else if (strcasecmp(type, "MASK") == 0 ||
+                   strcasecmp(type, "DARKMASK") == 0 ||
+                   strcasecmp(type, "FLATMASK") == 0) {
             options->zero = false;
             options->scale = false;
@@ -223,20 +225,12 @@
             options->mask = true;
         } else {
-            psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type);
-            options->zero = false;
-            options->scale = false;
-            options->darktime = false;
-            options->fringe = false;
-            options->shutter = false;
-            options->mask = false;
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised image type: %s", type);
+            psFree(options);
+            return NULL;
         }
     } else {
-        psLogMsg(__func__, PS_LOG_WARN, "No calibration type specified; assuming BIAS.\n");
-        options->zero = false;
-        options->scale = false;
-        options->darktime = false;
-        options->fringe = false;
-        options->shutter = false;
-        options->mask = false;
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "No image type specified.");
+        psFree(options);
+        return NULL;
     }
 
