in reply to Writing infront of the file
Note that while this is possible, in many file-systems this means alot of copies, as they are designed for appending to files in the end (and even then this causes problems such as fragmantation).
If you expect this file to grow large, it might be better to store it in reverse and then read it backwards or just reverse it (check the FAQ) once you are done.
Just wondering, why do you need it anyway?