A study of cofiniteness through minimal associated primes