finishing write script with editor