close out buffer