Handle exceptions in done callback (Fixes #6)