How would you write, like, 8 bytes to the end of a file then read to see if those 8 bytes exist?

thanks.