pub fn atomic_write_bytes(path: &Path, content: &[u8]) -> Result<()>
Write bytes to a file atomically (temp file + fsync + rename). Use this instead of std::fs::write for any file that must survive power loss.
std::fs::write