Add cost to cache. Also added lots of debugging to track the operation queue status.