End script with error code if the log file can't be located