made rotateFile optional and renamed day to days