If I understand you correctly, the act of writing the file is disturbing your timing on the data-collection part.
You need to have an average of the latest 9000 samples (15 * 60 * 10), and write the new average every 100 mSec. Are you opening/writing/closing the file each time? While that's the safest way (file is intact even if LabVIEW or your program crashes), it's not the fastest.
