Clear buffer if not written