OpenAppend
OpenAppend["file"] opens a file to append output to it, and returns an OutputStream object.
Examples
Open a file for appending:
stream = OpenAppend["myfile.txt"]Write and close:
WriteString[stream, "New line\n"];
Close[stream]Please visit the official Wolfram Language Reference for more details.