Improve hook/unhook command