How would you write, like, 8 bytes to the end of a file then read to see if those 8 bytes exist?
Have you even tried to google ? File handling is in almost every help file/website and is very basic. Here is one...