Make the frequency with how often we write the stats file a compile time option. Suggested by: Ruediger Pluem