Fix failure to write token info to YAML file [#41057685]