create temp file in getter to encapsulate assignment and instantiation