reworked error handling & fixed noNetwork bug