We study the effects of an intervention aimed at identifying and containing outbreaks in a network model of contagion where social distance is endogenous. The intervention induces a fall in the risk of infection, to which agents optimally respond by reducing social distance. If the intervention relies on infrequent or inaccurate testing, this crowding out effect may fully offset the intervention's direct effect, so that the risk of infection increases. In these circumstances, we show that "slow" interventions -which allow the outbreak to spread to immediate neighbors before being contained -may generate higher ex-ante welfare than "fast" ones and may even "crowd in" social distance. The theory thus identifies a trade off between (i) the swiftness of the intervention and (ii) the scope for crowding out. We show that the nature of this trade off crucially depends on the structure of the underlying social network and prevailing social norms.