modified to execute an external script file