Add closeConnection method