HOW TO USE PRINTF IN YOUR PROGRAM:

./[programname] -logfile [logfilename].txt