Log file rotation optimization