When loading the stub lib from jar, close the output file first.