getting file descriptor from a stream, and using lseek()