appends JSONoutput to a file