Write cookies when serializing