Output JSON

Output the JSON (beautified) to a file for viewing. Bit hacky but needed
to see output