Replace outputDir with an abstract object to ease printing to STDOUT.