Check whether the log file exists before reading it.