add the loop processing for downloading and uploading
remove the crash when the connected device cannot be processed