prevent crash on seeking at end of file