in reply to Writing to a file at a specific point.

Guestbooks generally slurp the entire file. Then split on a specific line of text in the file
(i.e. <!-- Add Guestbook Entries Here -->).
Then it's simply a matter of writing out both sections of the guestbook file with the additional text added in between.