FIX: Write session on finalization