added check for tfs version before check encoding