better logging of errors during token decoding