add -to-json cmd-line arg to download_all test program