option to write the scripted pid to file