It should write into a new file with an auto-generated unique `...tmp` suffix in the same directory, then do atomic file rename.