Logomatic - file_open_append files becomming corrupted

I am using the logomatic V2 combined with sleep cycles and big batteries for long term logging. My firmware is significantly different form the original but is based on it. I am 1) intermittently logging voltage into a text files when it is above a preset level and 2) continuously and logging the background voltage first into an array and then into a second file when the array fills. the first part seems to work very well and is reliable. The second part using file_open _append (thanks for that modification Iquaba ) seems to work for several cycles but after being left for 4 or 5 cycles, (and it may have something to do with logging a data file as in 1) the file becomes corrupted and will not open. Windows 7 can scan and fix the file but it ends up with a bunch of junk in the file, some of which looks like stuff destined for the data file (though all data files seem fine)

This behavior is a bit of a mystery to me and I would appreciate advice from someone with more SD card experience.

thanks,

Stefan

the file is becoming corrupted after around 1200 characters have been written to the file. the number of writes seems to be less important. first error messages are written to the file and new information start overwriting earlier text. As more info is written to the file, its contents can no longer be read.