better handling of errors when plugins fail