Index: trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 18554)
+++ trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 18567)
@@ -492,11 +492,4 @@
     }
 
-    if (file->type == PM_FPA_FILE_MASK) {
-	if (!pmConfigMaskReadHeader (config, phu)) {
-	    psError(PS_ERR_IO, false, "error in mask bits");
-	    return NULL;
-	}
-    }
-
     // build the template fpa, set up the basic view
     // XXX do we want this to be the baseCamera name or the metaCamera name?
@@ -538,4 +531,11 @@
         psFree(fpa);
         return NULL;
+    }
+
+    if (file->type == PM_FPA_FILE_MASK) {
+	if (!pmConfigMaskReadHeader (config, phu)) {
+	    psError(PS_ERR_IO, false, "error in mask bits");
+	    return NULL;
+	}
     }
 
@@ -824,11 +824,4 @@
     }
 
-    if (file->type == PM_FPA_FILE_MASK) {
-	if (!pmConfigMaskReadHeader (config, phu)) {
-	    psError(PS_ERR_IO, false, "error in mask bits");
-	    return NULL;
-	}
-    }
-
     // build the template fpa, set up the basic view
     fpa = pmFPAConstruct (camera, config->cameraName);
@@ -867,4 +860,11 @@
         psFree(fpa);
         return NULL;
+    }
+
+    if (file->type == PM_FPA_FILE_MASK) {
+	if (!pmConfigMaskReadHeader (config, phu)) {
+	    psError(PS_ERR_IO, false, "error in mask bits");
+	    return NULL;
+	}
     }
 
