// Use AnsiConsole only if term doesn't support Ansi
PrintStream out;
PrintStream err;
boolean ansi;
if (term.isAnsiSupported()) {
out = new PrintStream(new BufferedOutputStream(term.wrapOutIfNeeded(new FileOutputStream(FileDescriptor.out)), 16384), false, encoding);
err = new PrintStream(new BufferedOutputStream(term.wrapOutIfNeeded(new FileOutputStream(FileDescriptor.err)), 16384), false, encoding);
ansi = true;
} else {
out = AnsiConsole.out;
err = AnsiConsole.err;