add stat info on shutdown