debugging close connection