add an option for limiting the number of rotated logs