Add domains to handle unhandled exceptions and shutdown gracefully