Updated Logger to dump stats before unload