add network availability check