Tweaked some things on top of the well done PR #1768 - json import - fix expetion handling - fix indentation