Couldn't you remove the `else` and only write `out.Write(sf.FormatProgress(utils.TruncateID(id), "Download", "complete"))` once ?