update hook.js to exec file