Catching exception thrown by perfcounters on shutdown