Exception handling and UI update