Fix: if two test files having same prefix, it return the first one rather than matching one