Security checks added to HMRandomNetwork()