added code to make flank file contain only the filtered matches in the edited list file