Added close function when no USB device found

see title