few changes

console.log for debuging
bug: sometimes there is an extra "tr" in the collection for "oldresults"
if there is only one result, just download it