added loghook