add FileInfo class
some refactor