Add test-case for file rotation