fix the test

fix the files reading test
and add exception to the cdn class
 and remove useless function from the cdn class