Fix FileUtil stack overflow problem