esp: use trace framework instead of stderr output