Fixes #3. Inner exceptions are now logged.