Fix logging level
Clear the resource in case of a failure
Fix trivial typo