in reply to Need Help with writing to flat file from add_record sub

I think you don't need  seek DB, 0, 2.

(you are normally supposed to append to the end of a file, and >> takes care of that)