implemented UpgradeApplication in OS.cpp