Catching network errors on main activity