Modified the error message. `logx=True` should work, and I've added a test case.