Merge pull request #8750 from leoetlino/close-before-rename IOS/FS: Fix FST write failure on some platforms