add more codecs and better support for stdout
codec support for outputs. converted stdout output to use codecs.