I have added a queue to your code. This will allow the DAQ data to be moved from your main loop to the "file IO loop" without interrupting your main program anda filtering.
Let me know if you have any questions on this. There are example programs on queues as well as documentation in LV help if you want to do a little more research.
-Brett