FIXUP - "write" -> "replace"

Also, doc polish.