Changed output from stdout to file.