Catch exceptions when disabling plugins