set time and make a log file