reworked modes modules' filename matching