Fix periodic thread checking mechanism when waiting for downloads to complete