Added data collection for plugins and more logging errors and statistics