fix end-of-file newline