fix newlines at EOFs