Catch and log deactivate errors

Closes #3538