Removing empty lines at end of files