Made plugin process a separate thread