get file by index, not filename