Index: trunk/psModules/src/config/pmConfigRun.c
===================================================================
--- trunk/psModules/src/config/pmConfigRun.c	(revision 23447)
+++ trunk/psModules/src/config/pmConfigRun.c	(revision 23748)
@@ -41,10 +41,13 @@
 // Add a file to a nominated metadata in the RUN information
 static bool configRunFileAdd(pmConfig *config, // Configuration
-                             const pmFPAfile *file, // File to add
+                             const char *description, // Description of file
+                             const char *name, // Name of file
                              const char *target // Name of metadata to which to add
                              )
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
-    PS_ASSERT_PTR_NON_NULL(file, false);
+    PS_ASSERT_STRING_NON_EMPTY(description, false);
+    PS_ASSERT_STRING_NON_EMPTY(name, false);
+    PS_ASSERT_STRING_NON_EMPTY(target, false);
 
     psMetadata *run = configRun(config);// RUN information
@@ -53,9 +56,6 @@
     psAssert(files, "Require list of files");
 
-    const char *name = file->name;      // Name of symbolic file
-    const char *value = file->origname ? file->origname : file->filename; // The file (system) name
-
     psString regex = NULL;              // Regular expression for iteration
-    psStringAppend(&regex, "^%s$", name);
+    psStringAppend(&regex, "^%s$", description);
     psMetadataIterator *iter = psMetadataIteratorAlloc(files, PS_LIST_HEAD, regex);
     psFree(regex);
@@ -63,5 +63,5 @@
     while ((item = psMetadataGetAndIncrement(iter))) {
         psAssert(item->type == PS_DATA_STRING, "We only put STRING types here.");
-        if (strcmp(item->data.str, value) == 0) {
+        if (strcmp(item->data.str, name) == 0) {
             // It's already present
             psFree(iter);
@@ -71,5 +71,5 @@
     psFree(iter);
 
-    return psMetadataAddStr(files, PS_LIST_TAIL, name, PS_META_DUPLICATE_OK, NULL, value);
+    return psMetadataAddStr(files, PS_LIST_TAIL, description, PS_META_DUPLICATE_OK, NULL, name);
 }
 
@@ -79,5 +79,15 @@
     PS_ASSERT_PTR_NON_NULL(file, false);
 
-    return configRunFileAdd(config, file, "FILES.INPUT");
+    return configRunFileAdd(config, file->name, file->origname ? file->origname : file->filename,
+                            "FILES.INPUT");
+}
+
+bool pmConfigRunFilenameAddRead(pmConfig *config, const char *description, const char *name)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+    PS_ASSERT_STRING_NON_EMPTY(description, false);
+    PS_ASSERT_STRING_NON_EMPTY(name, false);
+
+    return configRunFileAdd(config, description, name, "FILES.INPUT");
 }
 
@@ -87,5 +97,15 @@
     PS_ASSERT_PTR_NON_NULL(file, false);
 
-    return configRunFileAdd(config, file, "FILES.OUTPUT");
+    return configRunFileAdd(config, file->name, file->origname ? file->origname : file->filename,
+                            "FILES.OUTPUT");
+}
+
+bool pmConfigRunFilenameAddWrite(pmConfig *config, const char *description, const char *name)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+    PS_ASSERT_STRING_NON_EMPTY(description, false);
+    PS_ASSERT_STRING_NON_EMPTY(name, false);
+
+    return configRunFileAdd(config, description, name, "FILES.OUTPUT");
 }
 
