bugfix: stack overflow when logging too long string