Hmm, I think we're going in circles.

When a file begins with "player1" and you run your code above, I expect that the string contains "player1" afterwards regardless how often you try. Your player variable is irrelevant because you overwrite the string from the file.

Maybe I'm stupid, but I still have no clue what your problem is.