update readme/example
handle write() after end()