ensure tlfs are synced before renaming them to their destination

What if I rename the function to with_new_exclusive_output_file? (Or maybe a with_temp_file ... which also handles the renaming etc ...)
For the semantics I have in mind I don't want O_APPEND or O_EXCL.
(And again, why make it more generic than needed?)