Changed LogHook, some fixes