move GetInstance helper into FileUtil