check for end of script file while making updates