While connected, if I unplug the device, netcat would not exit, which means the whole script would not exit.