Index: trunk/psModules/src/camera/pmFPAFlags.c
===================================================================
--- trunk/psModules/src/camera/pmFPAFlags.c	(revision 29833)
+++ trunk/psModules/src/camera/pmFPAFlags.c	(revision 29935)
@@ -49,4 +49,54 @@
 }
 
+bool pmReadoutSetFileStatus(pmReadout *readout, bool status)
+{
+    PS_ASSERT_PTR_NON_NULL(readout, false);
+
+    readout->file_exists = status;
+    return true;
+}
+
+bool pmFPAviewSetFileStatus (pmFPA *fpa, const pmFPAview *view, bool status) {
+
+    PS_ASSERT_PTR_NON_NULL(fpa, false);
+    PS_ASSERT_PTR_NON_NULL(view, false);
+
+    if (view->chip == -1) {
+	bool set = pmFPASetFileStatus (fpa, status);
+        return set;
+    }
+
+    if (view->chip >= fpa->chips->n) {
+        psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
+        return false;
+    }
+    pmChip *chip = fpa->chips->data[view->chip];
+
+    if (view->cell == -1) {
+        bool set = pmChipSetFileStatus (chip, status);
+        return set;
+    }
+
+    if (view->cell >= chip->cells->n) {
+        psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
+        return false;
+    }
+    pmCell *cell = chip->cells->data[view->cell];
+
+    if (view->readout == -1) {
+        bool set = pmCellSetFileStatus (cell, status);
+        return set;
+    }
+
+    if (view->readout >= cell->readouts->n) {
+        psError(PS_ERR_IO, true, "Requested readout == %d >= cell->readouds->n == %ld", view->readout, cell->readouts->n);
+        return false;
+    }
+    pmReadout *readout = cell->readouts->data[view->readout];
+
+    bool set = pmReadoutSetFileStatus (readout, status);
+    return set;
+}
+
 bool pmFPACheckFileStatus(const pmFPA *fpa)
 {
@@ -125,7 +175,57 @@
     for (int i = 0; i < cell->readouts->n; i++) {
         pmReadout *readout = cell->readouts->data[i];
-        readout->data_exists = status;
-    }
-    return true;
+        pmReadoutSetDataStatus(readout, status);
+    }
+    return true;
+}
+
+bool pmReadoutSetDataStatus (pmReadout *readout, bool status)
+{
+    PS_ASSERT_PTR_NON_NULL(readout, false);
+
+    readout->data_exists = status;
+    return true;
+}
+
+bool pmFPAviewSetDataStatus (pmFPA *fpa, const pmFPAview *view, bool status) {
+
+    PS_ASSERT_PTR_NON_NULL(fpa, false);
+    PS_ASSERT_PTR_NON_NULL(view, false);
+
+    if (view->chip == -1) {
+	bool set = pmFPASetDataStatus (fpa, status);
+        return set;
+    }
+
+    if (view->chip >= fpa->chips->n) {
+        psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
+        return false;
+    }
+    pmChip *chip = fpa->chips->data[view->chip];
+
+    if (view->cell == -1) {
+        bool set = pmChipSetDataStatus (chip, status);
+        return set;
+    }
+
+    if (view->cell >= chip->cells->n) {
+        psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
+        return false;
+    }
+    pmCell *cell = chip->cells->data[view->cell];
+
+    if (view->readout == -1) {
+        bool set = pmCellSetDataStatus (cell, status);
+        return set;
+    }
+
+    if (view->readout >= cell->readouts->n) {
+        psError(PS_ERR_IO, true, "Requested readout == %d >= cell->readouds->n == %ld", view->readout, cell->readouts->n);
+        return false;
+    }
+    pmReadout *readout = cell->readouts->data[view->readout];
+
+    bool set = pmReadoutSetDataStatus (readout, status);
+    return set;
 }
 
Index: trunk/psModules/src/camera/pmFPAFlags.h
===================================================================
--- trunk/psModules/src/camera/pmFPAFlags.h	(revision 29833)
+++ trunk/psModules/src/camera/pmFPAFlags.h	(revision 29935)
@@ -34,4 +34,8 @@
                         );
 
+bool pmReadoutSetFileStatus(pmReadout *readout, bool status);
+
+bool pmFPAviewSetFileStatus (pmFPA *fpa, const pmFPAview *view, bool status);
+
 // Functions to check the file_exists flags
 
@@ -65,4 +69,7 @@
                         );
 
+bool pmReadoutSetDataStatus (pmReadout *readout, bool status);
+
+bool pmFPAviewSetDataStatus (pmFPA *fpa, const pmFPAview *view, bool status);
 
 // Functions the check the data_exists flags
Index: trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileIO.c	(revision 29833)
+++ trunk/psModules/src/camera/pmFPAfileIO.c	(revision 29935)
@@ -135,7 +135,4 @@
     PS_ASSERT_PTR_NON_NULL(view, false);
 
-    // an internal file should not be sent here (should not be left on config->files)
-    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
-
     // skip the following states
     if (file->state & PM_FPA_STATE_INACTIVE) {
@@ -143,4 +140,8 @@
         return true;
     }
+
+    // an active internal file should not be sent here (should not be left on config->files)
+    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
+
     if (file->mode != PM_FPA_MODE_READ) {
         psTrace("psModules.camera", 6, "skip read for %s, mode is not READ", file->name);
@@ -258,11 +259,12 @@
         return true;
     }
+
+    // an active internal file should not be returned to here
+    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
+
     if (file->mode != PM_FPA_MODE_WRITE) {
         psTrace("psModules.camera", 6, "skip create for non-write file %s", file->name);
         return true;
     }
-
-    // an internal file should not be returned to here
-    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
 
     // get the current level
@@ -335,13 +337,10 @@
     }
 
+    // an ACTIVE internal file should not be sent here
+    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
+
     if (file->mode != PM_FPA_MODE_WRITE) {
         psTrace("psModules.camera", 6, "skip write for %s, mode is not WRITE", file->name);
         return true;
-    }
-
-    // an internal file should not be returned to here
-    if (file->mode == PM_FPA_MODE_INTERNAL) {
-        psError(PS_ERR_IO, true, "File is mode PM_FPA_MODE_INTERNAL");
-        return false;
     }
 
@@ -523,7 +522,4 @@
     PS_ASSERT_PTR_NON_NULL(view, false);
 
-    // an internal file should not be sent here (should not be left on config->files)
-    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
-
     // skip the following states
     if (file->state & PM_FPA_STATE_INACTIVE) {
@@ -531,8 +527,12 @@
         return true;
     }
+
     if (file->state == PM_FPA_STATE_CLOSED) {
         psTrace("psModules.camera", 6, "skip close for %s, files is closed", file->name);
         return true;
     }
+
+    // an active internal file should not be sent here (should not be left on config->files)
+    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
 
     // is current level == open level?
@@ -596,11 +596,11 @@
     PS_ASSERT_PTR_NON_NULL(view, false);
 
-    // an internal file should not be sent here (should not be left on config->files)
-    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
-
     if (file->state & PM_FPA_STATE_INACTIVE) {
         psTrace("psModules.camera", 6, "skip free for %s, files is inactive", file->name);
         return true;
     }
+
+    // an active internal file should not be sent here (should not be left on config->files)
+    PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
 
     // get the current level
@@ -746,5 +746,5 @@
     }
 
-    // these are programming errors
+    // an ACTIVE internal file should not be sent here
     PS_ASSERT(file->mode != PM_FPA_MODE_NONE, false);
     PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
