exception logging from doAndClose