Tweak APIs, add flow sample dump