Logger now correctly logs exceptions