improved CompileFile()