Use `with` statement in order to always close the file.

It will ensure that the file to clean is always closed, even if an exception is raised.