Right now it's storing the first '500' in the file, but when this event is triggered again, it doesn't add both 500's and store the result (1000), it always remains the same which is '500'.