Added an option to pretty-print the output
Added stdout printing