Linux uninstall script: Fixed error handling