added file selection functionality