Save pid file on startup