check directory statu before initialize