remove whitespace in end of file