adding in pre-empt of end of file