add lock file and thorfile