handling if the network is unavailable