Saves XML to file while printing info to log