finish the file_io_api.h
need to add the judge of the mode at parser.cpp and m2.cpp