logging
pdf attachment stuff