force write in pluginthread when shutting down