Add error handling for no network