check lockDir later if it is dir