Close the matchChan after looping through the paths.