improve command result writer logs
Add CacheListener code to the whole script