handle more extension load error cases. add new unit tests.