reset buffer of io writer mock