Changed output to log