I am using download manager in kotlin - android.
Downloded a file successfully as below :

```
fun downloadFirmwareFile(baseActivity: Context, url: String?, title: String?): Long {
    val direct = File(Environment.getExternalStorageDirectory().toString() + "/firmware")

    if (!direct.exists()) {
        direct.mkdirs()
    }
    val extension = url?.substring(url.lastIndexOf("."))
    val downloadReference: Long
    var dm: DownloadManager = baseActivity.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
    val uri = Uri.parse(url)
    val request = DownloadManager.Request(uri)

    var subPath = "bin" + System.currentTimeMillis() + extension
    request.setDestinationInExternalPublicDir(
            Environment.DIRECTORY_DOCUMENTS,
            subPath)

    Log.e("File path >> ", Environment.DIRECTORY_DOCUMENTS + subPath)

    request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
    request.setTitle(title)
    Toast.makeText(baseActivity, "start Downloading..", Toast.LENGTH_SHORT).show()

    downloadReference = dm?.enqueue(request) ?: 0

    downloadFirmwareLiveData.postValue("")

    var file = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), subPath)
    if (file.exists()) {
        Log.e("path >>>>>>>>>", "path >>>>>>>>>" + file.absolutePath)
    }else{
        Log.e("path >>>>>>>>>", "path >>>>>>>>> File not exists")
    }
    return downloadReference
}

```

Here, you can see I am trying to get the file path which is downloaded as below :

```
var file = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), subPath)
if (file.exists()) {
    Log.e("path >>>>>>>>>", "path >>>>>>>>>" + file.absolutePath)
}else{
    Log.e("path >>>>>>>>>", "path >>>>>>>>> File not exists")
}

```

But it gives me : path >>>>>>>>> File not exists

What might be the issue ? Please guide.