Fix bug with extracting name of downloaded file