fix main script file