trying to use seekdir and telldir alternatives..