* Add error handling function to library class
* Fix library loading