add logerror to email class