fix minute index, write stats to file