Fixed stats to work with gzipped files