better wget error handling