file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure

When `file(DOWNLOAD <url> EXPECTED_HASH <hash> LOG <logs>)` fails to
download the requested file, the hash check will also fail and make the
command exit without actually returning the curl logs as requested
by the `LOG` argument.  Report the log before checking the hash.

Issue: #24093
1 file changed