Fix bug of selectFile