Switch from post_install to pre_install hook