Write only different data to csv

Hi,
How can I write only different data to csv?
The way it is now the data is written over and over again.

[{"id":"9e249964.310998","type":"tab","label":"Flow 10","disabled":false,"info":""},{"id":"235666f3.69cdaa","type":"modbus-read","z":"9e249964.310998","name":"MI1001","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"1101","quantity":"26","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"bc8f47f0.a4dca8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"x":90,"y":220,"wires":[["93c3d930.fc3fb8","cccf2fa1.a1d8e","aa3f61d2.4e7f2","41c44043.fb16f","3fdafd50.1ec932"],[]]},{"id":"d0a960db.e6da9","type":"csv","z":"9e249964.310998","name":"","sep":",","hdrin":true,"hdrout":"once","multi":"one","ret":"\\r\\n","temp":"Data,Hora,Colaborador,Os,Status","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":810,"y":400,"wires":[["a22038a4.1c6e48"]]},{"id":"a22038a4.1c6e48","type":"file","z":"9e249964.310998","name":"Aquisicao_dados","filename":"C:\\Controle_horas.csv","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"utf8","x":970,"y":400,"wires":[[]]},{"id":"a9abe5b6.9b5d58","type":"debug","z":"9e249964.310998","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":590,"y":160,"wires":[]},{"id":"93c3d930.fc3fb8","type":"function","z":"9e249964.310998","name":"Status","func":"msg.payload = msg.payload.slice(0,4);\n\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":100,"wires":[["1091ba56.e2a5c6"]]},{"id":"1091ba56.e2a5c6","type":"buffer-parser","z":"9e249964.310998","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"item1","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":410,"y":100,"wires":[["4c747d9f.004a24","28a467dd.702bd8"]]},{"id":"4c747d9f.004a24","type":"debug","z":"9e249964.310998","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":590,"y":100,"wires":[]},{"id":"500c081a.83b758","type":"function","z":"9e249964.310998","name":"testes","func":"\nvar mensagem = msg.payload;\n\nvar data = mensagem[1];\nvar hora = mensagem[2];\nvar colaborador = mensagem[3];\nvar os = mensagem[4];\nvar status = mensagem[0];\n\nvar m = {'Data':data, 'Hora' :hora, 'Colaborador':colaborador, 'Os' : os, 'Status' : status};\n\nreturn {payload:m};\n\n\n\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":400,"wires":[["d0a960db.e6da9"]]},{"id":"cccf2fa1.a1d8e","type":"function","z":"9e249964.310998","name":"Status","func":"msg.payload = msg.payload.slice(5,9);\n\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":160,"wires":[["a27432e.be2e3d"]]},{"id":"a27432e.be2e3d","type":"buffer-parser","z":"9e249964.310998","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"item1","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":410,"y":160,"wires":[["a9abe5b6.9b5d58","28a467dd.702bd8"]]},{"id":"28a467dd.702bd8","type":"join","z":"9e249964.310998","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"0","count":"5","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":570,"y":400,"wires":[["500c081a.83b758"]]},{"id":"aef21519.334f28","type":"debug","z":"9e249964.310998","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":590,"y":220,"wires":[]},{"id":"ec310ad4.e24518","type":"buffer-parser","z":"9e249964.310998","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"item1","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":410,"y":220,"wires":[["aef21519.334f28","28a467dd.702bd8"]]},{"id":"aa3f61d2.4e7f2","type":"function","z":"9e249964.310998","name":"Status","func":"msg.payload = msg.payload.slice(11,19);\n\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":220,"wires":[["ec310ad4.e24518"]]},{"id":"77544a63.3cb044","type":"debug","z":"9e249964.310998","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":590,"y":280,"wires":[]},{"id":"170e5795.b316b8","type":"buffer-parser","z":"9e249964.310998","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"item1","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":410,"y":280,"wires":[["77544a63.3cb044","28a467dd.702bd8"]]},{"id":"41c44043.fb16f","type":"function","z":"9e249964.310998","name":"Status","func":"msg.payload = msg.payload.slice(20,24);\n\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":280,"wires":[["170e5795.b316b8"]]},{"id":"d9b1a31f.1d8dd","type":"debug","z":"9e249964.310998","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":590,"y":340,"wires":[]},{"id":"3fdafd50.1ec932","type":"function","z":"9e249964.310998","name":"Status","func":"msg.payload = msg.payload[25];\n\nif (msg.payload == true)\n{msg.payload=\"ABERTA\";\n}\n\nif (msg.payload == false)\n{msg.payload=\"FECHADA\";\n}\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":340,"wires":[["d9b1a31f.1d8dd","28a467dd.702bd8"]]},{"id":"bc8f47f0.a4dca8","type":"modbus-client","name":"V430","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.0.50","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"255","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

Your flow won't import:

A Filter node set to block unless the data changes?

Sorry, now it is possible to import.

That's right