Debugging problem with index query in file relay function.