Please introduce utility method for closing connections and use whenever possible