Different way to write pid file