better input file selection