fixed small bug

fixed small bug that caused output stats to print for each record rather than for each file