Check file exists when getting error log