Debugging token retrieval