Don't you need to set ````port_exists = false```` above this line (ie. inside the outer loop over ````m_available_device_list````?