modify make hash dir method