changed name of main script; tweaked pids.txt generation routine