added error message when loading shared library fails