Adding close() to client