Finished code for LogReader