package upgrade check updated and added reboot detection