Use with so the file gets closed afterwards
PEP8 fixes