Added debug to connection handler