Added log compaction (Log.truncate() still needs to be implemented though)