logging half working