WRITE case works perfectly after a little correction, this is the best revision to debug cache implementation