Incoroprated Scott's PR feedback for changes in logExceptions decorator, fixed bug, and implemented unit tests for it.