Add pre-install and pre-update check