hi! is it possible to append text on top instead of last line in a textfile?

or would it be possible to just read the last line of text without reading all the lines?

thanks