changed output to file