Adding flag to enable stats logging to disk for analysis