Generally would recommend not passing the wait group down into downloadFile - instead, reorganize downloadFile so that you invoke it inside an anonymous fund.  That keeps downloadFile from having to take a wait group argument (you may want to reuse it in other cases where a wg is not appropriate).