log + pre hooking