Added printing of failed urls to file, and added function to try to DL failed ones right before quit