Print to specified output file or STDOUT