add directory option for output