use file name instead of index