Some corrections to file selection