fixing Hadoop FileSystem closed exception