Minor bug fixed - closing FileSystem even before using it