fix temp file locator. previously generated new temp files on each call