finish non block stdio
use expandable buf count