saving before changing scripts and EventSource