added debug log statement for updating the connection state