remove redundant script
add a global variable to set the output file path