Using Basic File I/O always writes at the end of the file for new records being added. To get it to add to the top for new records beiing added you need to read the file in completely to an array and then delete or clear the file and write your new records and then write the old array records.