cmd_util: run_hooks