close buffer when BufLeave