set shutdown event before stats reporting