[#1785] Fix some resource leaks (close FileInputStream, or other object)
* Code cleanup: Remove unused import