added parameter for log file