remove newline from end of file