added logging of stacktrace in plugins