TASK 6: improvements for handling import failures.