Cope with blank lines at end of file