Switch to 'with open(...) as ...' idiom where reasonable to do so