ChooseFileCommand: refactoring - extracted couple methods.