Issue #24: additional cleanup to ensure we catch exceptions properly