fixed typo

The previous code was most probably a typo if i think. encoding ["%s\t%s\n"] and then substituting the values is not probably what you intended to do here.