Fix incorrect condition for throwing required output dir condition.