Fix logging when checking with file