WIP - A bunch of code for reading and writing log entries