modify upgrade_scanner.py