Index: /trunk/ppFringe/src/ppFringeData.c
===================================================================
--- /trunk/ppFringe/src/ppFringeData.c	(revision 7887)
+++ /trunk/ppFringe/src/ppFringeData.c	(revision 7888)
@@ -18,8 +18,4 @@
         data->outFile = NULL;
     }
-    if (data->templateFile) {
-        psFitsClose(data->templateFile);
-        data->templateFile = NULL;
-    }
     return;
 }
@@ -33,5 +29,4 @@
     data->inName = NULL;
     data->outName = NULL;
-    data->templateName = NULL;
     data->numPoints = 0;
     data->xWidth = 0;
@@ -43,5 +38,4 @@
     data->inFile = NULL;
     data->outFile = NULL;
-    data->templateFile = NULL;
     data->inFPA = NULL;
 
Index: /trunk/ppFringe/src/ppFringeData.h
===================================================================
--- /trunk/ppFringe/src/ppFringeData.h	(revision 7887)
+++ /trunk/ppFringe/src/ppFringeData.h	(revision 7888)
@@ -9,5 +9,4 @@
     const char *inName;                 // Input FITS image file
     const char *outName;                // Output FITS table file
-    const char *templateName;           // Name of template output file
     int numPoints;                      // Number of fringe points
     int xWidth, yWidth;                 // Width of fringe points in x and y
@@ -17,5 +16,4 @@
     psFits *inFile;                     // Input file handle
     psFits *outFile;                    // Output file handle
-    psFits *templateFile;               // Template file handle
     pmFPA *inFPA;                       // Input FPA
 } ppFringeData;
Index: /trunk/ppFringe/src/ppFringeSetup.c
===================================================================
--- /trunk/ppFringe/src/ppFringeSetup.c	(revision 7887)
+++ /trunk/ppFringe/src/ppFringeSetup.c	(revision 7888)
@@ -24,5 +24,4 @@
 {
     // Setup and parse command-line arguments
-    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-template", 0, "Template output", NULL);
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-detid", 0, "Detrend identifier", NULL);
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-classid", 0, "Class identifier", NULL);
@@ -40,5 +39,4 @@
     data->inName = config->argv[1];
     data->outName = config->argv[2];
-    data->templateName = psMetadataLookupStr(NULL, config->arguments, "-template");
 
     // Open the input file, determine the camera
@@ -69,4 +67,5 @@
         goto die;
     }
+    psFree(view);
 
     // Now we have a camera format, we can read the recipe
@@ -96,17 +95,9 @@
     READ_RECIPE_ITEM("MASKVAL", recipe, data->maskVal, U8);
 
-    // Open the output and template file
-    data->outFile = psFitsOpen(data->outName, "w");
+    // Open the output file
+    data->outFile = psFitsOpen(data->outName, "a+");
     if (!data->outFile) {
         psError(PS_ERR_IO, false, "Unable to open output file %s\n", data->outName);
         goto die;
-    }
-
-    if (data->templateName && strlen(data->templateName) > 0) {
-        data->templateFile = psFitsOpen(data->templateName, "r");
-        if (!data->templateFile) {
-            psError(PS_ERR_IO, false, "Unable to open template file %s\n", data->templateName);
-            goto die;
-        }
     }
 
