modified output file type, added error handling to deal with broken web page link