write json output to file for testing