add timeout to avoid Python process hanging. less flashing progress bar.