Print failed resource id and reason for failure

Fixes #33.