formulate trials output as proper JSON; add 'stale' command