Use idiomatic python way to open read/write then close a file