Index: /branches/pap_branch_070920/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- /branches/pap_branch_070920/psModules/src/camera/pmFPAfileIO.c	(revision 15171)
+++ /branches/pap_branch_070920/psModules/src/camera/pmFPAfileIO.c	(revision 15172)
@@ -359,13 +359,12 @@
             return false;
         }
+
+        // do we need to write out a PHU?
+        if (!pmFPAfileWritePHU(file, fileView, config)) {
+            psError(PS_ERR_IO, false, "failed to write phu for %s (%s)", file->filename, file->name);
+            return false;
+        }
+
         psFree (fileView);
-    }
-
-    // do we need to write out a PHU?
-    if (level >= file->fileLevel) {
-        if (!pmFPAfileWritePHU (file, view, config)) {
-            psError(PS_ERR_IO, false, "failed to write phu for %s (%s)", file->filename, file->name);
-            return false;
-        }
     }
 
