wrong method for check dir