add libcurl to download files and template file logic