Check for EOF in speedups