catch exception when importing