core: handle EOFError when checking checksum [GH-2716]