fix bug that cannot return after loading file failed