[TASK] refactor loading of libraries and prevent ext search from crashin...

...g