Shutdown the exchange properly