Fixed assert due to accessing shared var from non ui thread
Added url to download file callback
Added support for v2 api's and download file callback