remove lines at end of file