There could be one `if (!_.isUndefined(libPath)) return;` here. Just to prevent traversing directories if `libPath` is already found.