add unit test and fix fileseekiterator bug