stop reading if file finishes prematurely (test hack)