Added json output to command line tool