What do you mean by "replace the existing teams.txt"? You can't physically replace a project file with some other file in runtime.
What you can do is ignore the project file and load the data from the file provided by user.
If you want to save the data between sessions, you will need to save the list of teams (either from the project or provided by the player), say, in Local Storage. Then the logic could be something like this:
On start of the game:
If Local Storage has saved data -> Load teams from Local Storage
Else:
...Ask if the player wants to use standard teams
...If yes -> Load from teams.txt
...Else -> show FileChooser dialogue and load from selected file
At the end of the session/level -> Save current teams in Local Storage