Maybe we should separate atomic and none atomic save in 2 functions i think this could resolve the side effect problem or we can just re write 
```
f, err = os.Create(name)
if err != nil {
	return err
}
data := []byte(v.buffer.Substr(Region{0, v.buffer.Size()}))
for len(data) != 0 {
	var n int
	n, err = f.Write(data)
	if n > 0 {
		data = data[n:]
	}
	if err != nil {
		f.Close()
		if atomic {
			os.Remove(f.Name())
		}
		return err
	}
}
f.Close()
```