caveat about write_close