added code in main for log file