Keep directory structure when recursiveInput is true