close connection in finally section