Hook doesn't work

Hey there,

I am working on to create a pre-user registration hook to filter users by their IP address. I want to check users’ IP before get database information. So that I choose to create a hook instead of rules. However, It seems like it doesn’t work. at first, I thought it could be a code mistake. but even if I print a message through console.log, it doesn’t show anything. I used the code below.

module.exports = function (user, context, cb) {
  user.hello = 'world';
  console.log('===> set "hello" for ' + user.hello);
  cb(null, user, context);
}; 

I checked the logs with real-time webtask logs, it shows just as below.

11:45:47 AM:Connected
11:48:35 AM:new webtask request
11:48:35 AM: finished webtask request

I have also tried with Client Credentials Exchange hook, and Post User Registration hook, it gives me the same result. I have double checked the hooks are active. I have no idea how to make it work. Can anybody help me with this?

Can you confirm that this is really the pre-user registeration hook and not post-user registration.
Also, it is a user from a database connection, not a social connection (Facebook, Google), right? Cause these don’t trigger the hook.
And the hook is also enabled, I assume.