write pid to lock file