Read the current text file into a variable, then add the current post to that variable like:
$new_data = $current_post . "<HR>" . $file_data;
Then use the file write setting ("w") instead of the append ("a"). Write the "New Data" variable to the file.
That should solve your problem.