Never mind, just figured what I was doing wrong. The create file function was in the loop so each interval it was making new file, overwritting on the previous one thus earasing all previous data but the last data point.
------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂