Make sure the script is saved when user leave the script editor without save.