Write to file instead of stdout.