"File Format is not supported" exception

I'm creating an android application in which user can edit, create Html file and save it to internal Storage, the problem is after saving the HTML file when I try to open the file there's a message saying "File Format is not supported". what should I do?