fixing unit test bug with logging in