close connection in finally