error handling when network is down