Generates an optional JSON report in the output directory.