How to append text at the beginnig of a file?