Index: trunk/psphot/src/psphot-utils.c
===================================================================
--- trunk/psphot/src/psphot-utils.c	(revision 4398)
+++ trunk/psphot/src/psphot-utils.c	(revision 4421)
@@ -57,5 +57,5 @@
 {
 
-  FILE *f = fopen (key, "w");
+  FILE *f = fopen (filename, "w");
 
   for (int j = 0; j < test->sources->n; j++) {
@@ -72,4 +72,5 @@
   }
   fclose (f);
+  return true;
 }
 
@@ -154,9 +155,6 @@
 {
 
-    int i, j;
-    FILE *f;
-    psVector *params;
-    psVector *dparams;
-    psModel  *model;
+    int i;
+    FILE *f;
 
     f = fopen (filename, "w");
