Adds missing flushes prepending file rotations