Perhaps you should post your VI. That will make it easier for us to see what you are trying to do.
I like to use an architecture which has separate, parallel loops for the user interface (UI), data acquisition, and other processing (such as writing to files). This allows each to run at different time scase as appropriate to the needs.
For your case the data acquisition loop would poll the two devices and read data when available. It would send the data via queues or functional globals to the processing loop along with an identifier telling which source generated the data. The processing loop would do any calculations, format conversions, etc., and write the data to the file. The Write Characters to File.vi has a boolean input called "append to file?" which controls wheter the data being written is placed at the end of an existing file or starts a new one. The processing loop also send any data to the screen for the user interface as well as receiving commands from the UI.
Lynn