memory leak found

works but opens a new file on each iteration in s-function
working

needs i2c address changing to a parameter