Replace network with with_connectivity_check