fixed send_wait_complete to actually wait for gadgetfs writes