function_hooks: add some debug output