OK - I solved my issue. I was using nano file editor to create token.tkn file. I would then paste the token into the first line and save using CTRL-O. It failed with the above error.

I tried creating the file with cat > token.tkn and pasting the token followed by CTRL-D.

It now works fine. So nano must be putting some invalid character at the end of the pasted token string that 'tcmd' can't deal with. Maybe 'tcmd' could be updated to check for this?

Thanks!