fix error/exception handling for loading plugins