fix bug of path.c, implement read_file().