add dynamic plugin support and error handling