modularised filename extension matching