Improved error handling (offline mode)