Index: trunk/pswarp/src/pswarpArguments.c
===================================================================
--- trunk/pswarp/src/pswarpArguments.c	(revision 25538)
+++ trunk/pswarp/src/pswarpArguments.c	(revision 27096)
@@ -26,6 +26,6 @@
     // load config data from default locations
     pmConfig *config = pmConfigRead(&argc, argv, PSWARP_RECIPE);
-    if (config == NULL) {
-        psError(PSWARP_ERR_CONFIG, false, "Can't read site configuration");
+    if (!config) {
+        psError(psErrorCodeLast(), false, "Can't read configuration");
         return NULL;
     }
@@ -33,5 +33,9 @@
     // save the following additional recipe values based on command-line options
     // these options override the PSWARP recipe values loaded from recipe files
-    pmConfigRecipeOptions (config, PSWARP_RECIPE);
+    if (!pmConfigRecipeOptions(config, PSWARP_RECIPE)) {
+        psError(psErrorCodeLast(), false, "Can't do something with recipes");
+        psFree(config);
+        return NULL;
+    }
 
     pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM",   "-astrom", "-astromlist");
@@ -72,5 +76,5 @@
         psThreadPoolInit (nThreads);
     }
-    pswarpSetThreads ();
+    pswarpSetThreads();
 
     if ((N = psArgumentGet(argc, argv, "-dumpconfig"))) {
@@ -160,5 +164,5 @@
     bool PSF = psMetadataLookupBool(&status, recipe, "PSF"); ///< Generate a PSF model?
     if (!status) {
-	PSF = true;
+        PSF = true;
         psWarning("PSF is not set in the %s recipe --- defaulting to TRUE.", PSWARP_RECIPE);
     }
