register import hook only if needed