fix trailing whitespace & newline at EOF issues