Retroduced partial merge as to prevent exceeding maxOpenFiles limit.