Index: branches/czw_branch/20120906/ppStack/src/ppStack.h
===================================================================
--- branches/czw_branch/20120906/ppStack/src/ppStack.h	(revision 34667)
+++ branches/czw_branch/20120906/ppStack/src/ppStack.h	(revision 34678)
@@ -40,6 +40,6 @@
     PPSTACK_FILES_PHOT,                 // Files for photometry
     PPSTACK_FILES_BKG,                  // Files for bkg
-    PPSTACK_FILES_MEDIAN,                // Files for median only stacks.
-    PPSTACK_FILES_MINIMAL                // Files for median only stacks.
+    PPSTACK_FILES_MEDIAN_IN,                // Files for median only stacks.
+    PPSTACK_FILES_MEDIAN_OUT                // Files for median only stacks.
 } ppStackFileList;
 
Index: branches/czw_branch/20120906/ppStack/src/ppStackCleanup.c
===================================================================
--- branches/czw_branch/20120906/ppStack/src/ppStackCleanup.c	(revision 34667)
+++ branches/czw_branch/20120906/ppStack/src/ppStackCleanup.c	(revision 34678)
@@ -76,7 +76,6 @@
 
 bool ppStackCleanup (pmConfig *config, ppStackOptions *options) {
-
     psExit exitValue = ppStackExitCode(PS_EXIT_SUCCESS); // Exit code
-
+    
     // Ensure everything closes
     if (config) {
@@ -86,4 +85,6 @@
 	ppStackFileActivation(config, PPSTACK_FILES_UNCONV, true);
 	ppStackFileActivation(config, PPSTACK_FILES_PHOT, true);
+	ppStackFileActivation(config, PPSTACK_FILES_MEDIAN_IN, true);
+	ppStackFileActivation(config, PPSTACK_FILES_MEDIAN_OUT, true);
 	if (!ppStackFilesIterateUp(config)) {
 	    psError(psErrorCodeLast(), false, "Unable to close files.");
Index: branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c
===================================================================
--- branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c	(revision 34667)
+++ branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c	(revision 34678)
@@ -29,9 +29,9 @@
     if (expName) {
       pmCell *expCell = pmFPAfileThisCell(config->files, view, expName); // Exposure cell
-      options->expRO = pmReadoutAlloc(expCell); // Output readout
+      options->expRO = pmReadoutAlloc(expCell); //Output readout
     }
-    else {
-      options->expRO = NULL;
-    }
+/*     else { */
+/*       options->expRO = NULL; */
+/*     } */
     pmCell *bkgCell;
     int bkg_r0,bkg_c0;
Index: branches/czw_branch/20120906/ppStack/src/ppStackFiles.c
===================================================================
--- branches/czw_branch/20120906/ppStack/src/ppStackFiles.c	(revision 34667)
+++ branches/czw_branch/20120906/ppStack/src/ppStackFiles.c	(revision 34678)
@@ -19,8 +19,8 @@
 
 /// Files required for median only stacking
-static char *filesMedian[] =  { "PPSTACK.INPUT",                              			     
+static char *filesMedianIn[] =  { "PPSTACK.INPUT",                              			     
                               NULL };
 /// Files required for median only stacking
-static char *filesMinimal[] =  { "PPSTACK.OUTPUT",                              			     
+static char *filesMedianOut[] =  { "PPSTACK.OUTPUT",                              			     
                               NULL };
 
@@ -53,6 +53,6 @@
       case PPSTACK_FILES_PHOT:     return filesPhot;
     case PPSTACK_FILES_BKG:        return filesBkg;
-    case PPSTACK_FILES_MEDIAN:        return filesMedian;
-    case PPSTACK_FILES_MINIMAL:        return filesMinimal;
+    case PPSTACK_FILES_MEDIAN_IN:        return filesMedianIn;
+    case PPSTACK_FILES_MEDIAN_OUT:        return filesMedianOut;
       default:
         psAbort("Unrecognised file list: %x", list);
