fixed compiler warning and missing close of Jar file