Program that was needed to read the last line of a file and output a new file with that name