added error handling for LogFileReader.parse and fix some bugs