removed closing of connections in finally block