Improve the logic responsible for updating the known devices list