By default, curls downloads the HTML error page and exits with code 0 when a server replies with a HTTP error code (e.g., 404), causing a SHA256 mismatch afterwards.
Adding the `--fail` flag makes curl exit with non-zero error code and print an error like "The requested URL returned error: 404", making it a bit easier to diagnose distfile download issues.
Also replaced `-L` with `--location` for the sake of script readability.