Add a cache variable to trigger logging machinery.
rename file.
Add macros for shared pointer cast.