Simplify select_file by removing cache and recursivity. Avoids a compiler warning and a random error.