mei: streamline write complete flow function