Making downloadFile multiplatform