Need to catch a couple exceptions here which can happen during shutdown