update logger class to log exceptions correctly