Better exception handling and exception logging with stactrace, made event a dictionary as opposed to tuple