little refactor, menu choose file