here you attempt the close in the try block but in `getImportCandidates` you don't