check for (off_t)-1 in lseek not just less than 0