Fix for offline mode
Refactor exception handling