Fixed the error in handling failures on import.