automatically close window when click on link and after import starts