custom implementation of file name matching