don't use break under that "else if", you will just stop the for loop from continuing when the first steamid in the file isn't the connected players one.
Code:
native write_file(const file[], const text[], line = -1);
use the third parameter to specify a line you wan't to write.