Poke the Data acquired into a Queue. (making this the producer loop)
De-Q the Data in another loop (consumer loop)
Update the file in the consumer loop - this means that File IO overhead will not affect your sampling rate.
Open the File reference before the Consumer Loop starts and close it when complete to minimise File Opening and closing as data is saved (or save the file every n samples/seconds if you are paranoid)
This will get you a faster more flexible architecture - File IO has a much larger overhead than DAQ normally so moving this to a seperate Q and thread allows parallel processing.
James
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed