check if download has finished as unfinished one triggers an infinite loop