Some updates
Added line to check if we were online and if not only use local resources