saveFile

Flushes all remaining data to the file, closes all buffers and files, and returns the file name.

Return

Returns the file name if successful, null if there was an error