Using a closing context with the with block