Fix matching filenames for modes