add file downloader and improve tests.