refactor file struct , code style more like Pyro4