Fixed bub when html and text files did not exist