Save Pid on State File