When running in foreground, a PID file should be created only if the `--pid-file` option is specified. Rel #25