Redirect output to log file.