Added close connection method