Update SelectFiles to infer infields from templates