to make FileDialogSelect as API function