Add some functions and change some file mode