Added support for flags for output formatting