Get rid of non-required close statements

As @krisztianfekete mentioned, close() is called upon exiting from the
context.