add no-pretty output optioni, better message for invalid json