Merge "Use the same logic for selecting config path"