Index: trunk/psastro/src/psastroDataSave.c
===================================================================
--- trunk/psastro/src/psastroDataSave.c	(revision 23706)
+++ trunk/psastro/src/psastroDataSave.c	(revision 23753)
@@ -89,9 +89,8 @@
     psString dump_file = psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
     if (dump_file) {
-        pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PSASTRO.INPUT"); // Input file
         pmConfigCamerasCull(config, NULL);
         pmConfigRecipesCull(config, "PPIMAGE,PPSTATS,PSPHOT,MASKS,PSASTRO");
 
-        pmConfigDump(config, input->fpa, dump_file);
+        pmConfigDump(config, dump_file);
     }
 
Index: trunk/psastro/src/psastroMetadataStats.c
===================================================================
--- trunk/psastro/src/psastroMetadataStats.c	(revision 23706)
+++ trunk/psastro/src/psastroMetadataStats.c	(revision 23753)
@@ -66,7 +66,8 @@
 
     // write the stats MDC to a file
-    // XXX why does this not call psMetadataConfigPrint?
     fprintf(statsFile, "%s", statsMDC);
     fclose(statsFile);
+
+    pmConfigRunFilenameAddWrite(config, "STATS", filename);
 
     psFree(resolved);
