Log an error if the hook fails importing some other module.

Maybe it's even better to raise the ImportError here so errors in hooks
are discovered more easily.