Catch exceptions in shutdown-agents