Bug 962040 - Catch errors to not break the JSON output. r=julienw

Also make sure VERBOSE is sent to stderr.

Add more verbosity to track where it might hang.
Merge pull request #16527 from hfiguiere/bug962040

Bug 962040 - Catch errors to not break the JSON output r=julienw