doc: improve doc for .write()/.end()