error check when make directory