Add log to file code.