add log and fix bug with transaction log