Little typo
Use with open(...) as ...
More condensed conditions