use trace filter API with write/flush