Taking care of unclosed streams
removed  dead store to local variable
fixed Result of integer multiplication cast to long error
"Bug" fixing