refactor FileSystem class