Arduino Creating Text (.TXT) Files On An USB Using An USB Host Shield

Can someone please help me with creating a text file on an USB storage device that contains the output from a sensor.

Any help will be greatly appreciated as I am very new to arduino.

Thanks in advance,
Trent.