Better preinstall script