adding error handling around amq stats