output the log into file