Local file overwritten

I have a local file that I have been using to log time stamped temperature data to. It has been running several days, and accumulated a few thousand lines of a data (<100kb). This morning I went to look at it and there was only one, most recent (about the time that I opened the file), line of data in it. Somehow the rest of the data had been deleted or overwritten. I opened the file with the direct access URL hubitatip/local/TempLog.txt. Any ideas how this could have happened?

Upon returning to look at the file again, the data logged since I first opened opened the file this morning is gone, and only 3 recent records exist.

What are you using to write to the file normally?

Just an Append in rule machine 5.1

Might want to turn logging on for the rule and see if it is having an issue reading the previous data.

I've turned on logging for the rule. Will have to wait for data loss again. Have seen the following error in the logs several times, but does not appear to be related to the lost data.
"java.nio.file.FileSystemException: TempLog.txt: Unable to delete existing file on line 5762 (method allHandler)"

It happened again early this morning. I had it triggering if any of the logged values changed. That appears to have triggered the rule twice within a few msecs. Suspect the two writes conflicted and caused the data loss. Have changed it to a simple 5 min logging period.