Updated preinstall script