> Not using SQL? Okay. You're spending a lot of time and effort hand-rolling your own shitty database.
I've seen this before.
It crashed and corrupted most files because the author didn't understand how file IO really worked (he also created a ramdisk thinking it would be faster).
Fortunately, someone took a memory dump of the process some times before and most data was recovered.