- atomic writes (write to new file, rename) to avoid some edge cases
at OOM when File.open truncates but still fails and ends up with an
empty file.