Pass a better file object through from scan
Correct linting errors