Redirect output to file, so we can use file to determine character encoding.
Print defaultCharset picked up from CLI.