Add support for specifying output format