use JSON.stringify instead of utils.dump

JSON.stringify is more robust.