public static void close(Connection connection) {
        if (connection != null) {
            try {
                connection.close();
            } 
            catch (SQLException e) {
                System.err.println("Closing Connection failed: " + e.getMessage());
                e.printStackTrace();
            }
        }
    }