added bufclose, delimitmate