Add ability to capture matches in output files