updated logging, fixing mailing