Replace lock file