How about using promises and the downloadDone if it exists