Added support for gracefully handling maximum debug log errors and
support for writing out a json result file with test results and limit
usage (if debugging is enabled)