Tentative commit. Thinking controller may work and just changed fprintf to fwrite for cache fules.