Fixed a log file checking