Check if daemon already running when starting, not only check if the PID file exists.
Also added unlink of the PID file on PHP shutdown.