added session_write_close