The CLI allows HTML and JSON files to be created using -o [filename] or --output [filename]. This feature was not working and returned "Unable to fetch content from [URL]" error. This was due to err.res being passed to the file writer instead of res (err.res should be used in the catch statement).
Summary
Fix for CLI not outputting HTML / JSON files
Detail
The CLI allows HTML and JSON files to be created using -o [filename] or --output [filename]. This feature was not working and returned "Unable to fetch content from [URL]" error. This was due to err.res being passed to the file writer instead of res (err.res should be used in the catch statement).