Added handling for json output to stdout when user passes -o - as otion