Added error checking. Improved Jquery downloader