Simple program to record sensor data on a text file