Index: trunk/psastro/src/psastroDefineFiles.c
===================================================================
--- trunk/psastro/src/psastroDefineFiles.c	(revision 17039)
+++ trunk/psastro/src/psastroDefineFiles.c	(revision 17061)
@@ -41,13 +41,14 @@
     if (saveRefstars) {
 	// look for the file in the camera config table
-	pmFPAfile *file = pmFPAfileDefineFromConf  (&status, config, "PSASTRO.REFSTARS");
-	if (!status) {
+	pmFPAfile *file = pmFPAfileDefineOutputFromFile  (config, input, "PSASTRO.OUT.REFSTARS");
+	if (!file) {
 	    psError (PS_ERR_IO, false, "Can't find the astrometry refstars file definition");
 	    return NULL;
 	}
 	if (file->type != PM_FPA_FILE_ASTROM_REFSTARS) {
-	    psError(PS_ERR_IO, true, "%s is not of type %s", "PSASTRO.REFSTARS", pmFPAfileStringFromType (PM_FPA_FILE_ASTROM_REFSTARS));
+	    psError(PS_ERR_IO, true, "%s is not of type %s", "PSASTRO.OUT.REFSTARS", pmFPAfileStringFromType (PM_FPA_FILE_ASTROM_REFSTARS));
 	    return NULL;
 	}
+	file->save = true;
     }
 
