Added more debug info for download errors

When a download fails, store the exception
in the grade extended reason for debugging.