changed code

soup.find instead of soup.findAll and whole instead of whole[0],
Converted to string before writing to file.