Adding writeToCNFFile