Fix for overwriting original data property

I was overwriting the data variable, which meant that if multiple files were processed the data function was being overwritten and the data generated from the first run was being used for any additional files.

Sorry about that.