added write/read embodied close #3