first version of rotateOnDisk