is "synchronizeFile" needed to guarantee file integrity on the iPhone?
===

I have a problem in an iPhone application where some files that appear to be fine when the app runs appear with 0 size on some occasions when the application restarts.  I have checked my code all over.   The way these files are written is basically :


       NSFileHandle *fHandle = [NSFileHandle fileHandleForWritingAtPath: myFileName];
       do 
       {
            // code to set value of myNSData
            [fHandle writeData: myNSData];
            // some more logic here
       } 
       while (!done)
       
       [fHandle closeFile];

I have seen the problem happen both in the simulator and on the real device.  It only happens sporadically so the situation is hard to track.  

My question is:  Do I need to call [fHandle synchronizeFile]  to make sure the data goes to permanent storage?   Is there a chance that iOS will loose data from the file buffers before it is sent to permanent storage resulting in 0 size file when I reopen the app?