Use with open context operator instead of just open

- Use with open() context operator instead of just open().
- Few lines of code by removing unneeded file.close() but safer working.
- Peer Review welcome, to be merged maybe on Monday.

:octocat: