logger in the wrong place fixed