if (hdfsExists(hd->fs, options->directory) < 0 || hdfsSetWorkingDirectory(hd->fs, options->directory) < 0) {
failure = errno;
log_err("hdfs: invalid working directory %s: %s\n", options->directory, strerror(errno));
if (hdfsExists(hd->fs, options->directory) < 0 || hdfsSetWorkingDirectory(hd->fs, options->directory) < 0) {
failure = errno;
log_err("hdfs: invalid working directory %s: %s\n", options->directory, strerror(errno));