python save json output to file