changed error handling for wget