Index: /trunk/psModules/src/config/pmConfig.c
===================================================================
--- /trunk/psModules/src/config/pmConfig.c	(revision 12914)
+++ /trunk/psModules/src/config/pmConfig.c	(revision 12915)
@@ -4,6 +4,6 @@
  *  @author EAM (IfA)
  *
- *  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-18 22:42:33 $
+ *  @version $Revision: 1.89 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-19 02:10:03 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -246,7 +246,7 @@
         }
         if (item->type != PS_DATA_STRING) {
-            psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Element %s in %s metadata is not of type STR.\n",
-                    item->name, description);
-            continue;
+	   psTrace("config", 2, "Element %s in %s metadata is not of type STR.\n",
+		   item->name, description);
+	   continue;
         }
 
@@ -254,9 +254,9 @@
         psMetadata *new = NULL;         // New metadata
         if (!pmConfigFileRead(&new, item->data.str, item->name)) {
-            psLogMsg("psModules.config", PS_LOG_WARN, "Trouble reading reading %s %s --- "
-                     "ignored.\n", description, item->name);
+	    psError(PM_ERR_CONFIG, false, "Trouble reading reading %s %s --- "
+		    "ignored.\n", description, item->name);
             psFree(new);
-            psMetadataRemoveKey(source, item->name); // Take it out, so it will not trouble us again
-            continue;
+	    psFree(iter);
+	    return false;
         }
 
@@ -294,5 +294,5 @@
 
 
-pmConfig *pmConfigRead(int *argc, char **argv, char *defaultRecipe)
+pmConfig *pmConfigRead(int *argc, char **argv, const char *defaultRecipe)
 {
     PS_ASSERT_PTR_NON_NULL(argc, NULL);
@@ -514,5 +514,10 @@
             }
 
-            pmConfigFileRead(&config->camera, cameraFile, "camera");
+            if (!pmConfigFileRead(&config->camera, cameraFile, "camera")) {
+                psError(PM_ERR_CONFIG, false, "Problem reading %s", cameraFile);
+                psFree(config);
+                return NULL;
+	    }
+	    
             psArgumentRemove(argNum, argc, argv);
 
@@ -580,12 +585,11 @@
 
     // load command-line options of the form -recipe NAME RECIPE
-    pmConfigLoadRecipeArguments(config);
+    pmConfigLoadRecipeArguments(argc, argv, config);
 
     // read in command-line options to specific recipe values
-    pmConfigLoadRecipeOptions(config, "-D");
-    pmConfigLoadRecipeOptions(config, "-Di");
-    pmConfigLoadRecipeOptions(config, "-Df");
-    pmConfigLoadRecipeOptions(config, "-Db");
-
+    pmConfigLoadRecipeOptions(argc, argv, config, "-D");
+    pmConfigLoadRecipeOptions(argc, argv, config, "-Di");
+    pmConfigLoadRecipeOptions(argc, argv, config, "-Df");
+    pmConfigLoadRecipeOptions(argc, argv, config, "-Db");
 
     // check for values that override DB* keywords
