Cont. fixing the bug with logging