add support for file rotate