Storing PID in temporary file.