Closing the session in finally