write and read coexisting

closing before and after writing so that writer and then reader can
claim usb endpoints