adds lock file