Fixed error checking incase log file not present to actually work.