move grub check at the end of the upgrade