Added proper template caching to FileLoader class.