Output json to stdout

Also replace print to print on stderr
Merge branch 'master' into feature-output-result-stdout
git push origin masterMerge branch 'feature-output-result-stdout'