removing whitespace at the end of the file