better error management for uninstall command