Added invert for sonar
Be more verbose on errors