Fix logging error in tests