Exit correctly from the download process when offline fails