Fix error handling in CLI uninstallation