ReplaceFile just renames (move) the file if possible.
If that fails it will read the src file and write the content to the destination file.
It returns an error if any.
SameFile reports whether src and dest config files are equal.
Two config files are equal when they have the same file contents and
Unix permissions. The owner, group, and mode must match.
It return false in other cases.