Add log in hook script