lock file as well