Create a pid file when daemon runs.