refactor. fix loadFile bug where ngw.path was forgotten