use lock_dir variable