new end of file detection