Index: trunk/psastro/src/psastroDefineFiles.c
===================================================================
--- trunk/psastro/src/psastroDefineFiles.c	(revision 32964)
+++ trunk/psastro/src/psastroDefineFiles.c	(revision 36441)
@@ -100,4 +100,18 @@
     }
 
+    bool writeCff = psMetadataLookupBool (&status, recipe, "PSASTRO.SAVE.CFF");
+    if (writeCff) {
+	pmFPAfile *file = pmFPAfileDefineOutputFromFile  (config, input, "PSPHOT.OUTPUT.CFF");
+	if (!file) {
+	    psError (PS_ERR_IO, false, "Can't find the output cff file definition");
+	    return NULL;
+	}
+	if (file->type != PM_FPA_FILE_CFF) {
+	    psError(PS_ERR_IO, true, "%s is not of type %s", "PSPHOT.OUTPUT.CFF", pmFPAfileStringFromType (PM_FPA_FILE_CFF));
+	    return NULL;
+	}
+	file->save = true;
+    }
+
 
 # if (0)
