My first thought would be that you might be stopping your host PC application (and thereby closing references to the RT VI) before the RT VI has completed writing the file. The RT OS is not optimized for file I/O, and if you are not explicitly writing the file in 512-byte chunks, it may be taking a very long time.
Check out this example:
Fast File Writing in LabVIEW Real-TimeNote: Delete the stray "Write to Spreadsheet File.vi" in the block diagram.
If this ends up not helping and no one else can provide any other suggestions, you might try contacting the LabVIEW RT support group at National Instruments for further assistance.