added SaveEveryNPercent option