Error handling when loading plugins