Clean up of DownloadFile

moved multiple delegate calls into one function to avoid calling the
delegate multiple times
Added global breakpoints