move some more sanity checks to the upgrade script.