Remove duplicate run_plugin function
Extract asynchronous plugin runner