upgrade.py: Use util.py