reworked channel and file matching