Script working but detect an error with BufWrite envent