public void DownloadFile(LegacyResource resource, string path, FileSource source, string _connectionId = null) { Rest.DownloadStream(path, _connectionId).ContinueWith(stream => { Log.Out("FileStore", string.Format("Finished download for {0}", resource.Name), LogCode.Log); AddFile(resource, stream.Result, source); }); Log.Out("FileStore", string.Format("Started download for {0}", resource.Name), LogCode.Log); }