added text directory option