Improve error reports

- use direct json format for error report details
- make plain text format mostly yaml compatible
- improve html format to be proper