replace die() with plugin->exit()