Fix pid file