added logging errors in transcation