Added 'output to file'

Now outputs JSON to a file called output