Modify mk_flushContextData to keep track of our current file position, and EOF.