I want to be able to do a check to see if a file exists and if it does i want to append something to
the end of the file, otherwise I want to create a new file.
so for example, if the file exists in the given directory and there is something written in it. I want to be able to check the first word and do a comparison on it with a string in my code.
just append something to it, otherwise i want to create a new one.