+To accomplish this +atomic_write+ creates a temporary file. That's the file the code in the block actually writes to. On completion, the temporary file is renamed. If the target file exists +atomic_write+ overwrites it and keeps owners and permissions.
+WARNING. Note you can't append with +atomic_write+.
+The auxiliary file is written in a standard directory for temporary files, but you can pass a directory of your choice as second argument.