ENH: find the best input file