Amit Gupta - 2013-05-15

Attached is the patch showing code changes for saving log to a file. ''logfile" needs to be set to logfile name for enabling the log saving