added umi checking logic for read writing