Tools: fix I/O operation and adjust code style
Tools: fix I/O operation and adjust code style

xiaoxq/apollo,xiaoxq/apollo,jinghaomiao/apollo,ycool/apollo,ApolloAuto/apollo,ApolloAuto/apollo,ycool/apollo,wanglei828/apollo,xiaoxq/apollo,jinghaomiao/apollo,xiaoxq/apollo,ApolloAuto/apollo,jinghaomiao/apollo,wanglei828/apollo,ycool/apollo,ycool/apollo,jinghaomiao/apollo,wanglei828/apollo,xiaoxq/apollo,ycool/apollo,jinghaomiao/apollo,xiaoxq/apollo,wanglei828/apollo,wanglei828/apollo,ApolloAuto/apollo,jinghaomiao/apollo,ycool/apollo,wanglei828/apollo,ApolloAuto/apollo,ApolloAuto/apollo