fix: use SEEK_CUR to get the file position