Made the downloader Thread safe and added exception handling.