Add ensure_hooks method