refine the script, add build/run/stop