Theres bound to be issues considering how long (lines) a txt file can get in just a few seconds of gameplay.
I’d remove the \n and use some other kind of separator, like ; or | to delimit entries, so the file itself is just a flat one liner.
Acting sort of like a byte blob.
It would make it less likely to have file I/O issues when the size of the file hits 4/5 GB…