added wrapDir option