Remove extra space and add newline at end of file.