Remove ~ after end-of-file