Stats file creating new fd for every write fix