It is probably easier to do `fp.seek(0)` and you can remove the `old_pos = fp.tell()` statement