fix the bug of initFile()