close popup when file type is wrong