Added code to prevent serialization exceptions being sent via email