You can save your caramel if it clumps up after you add the cream by returning it to the heat and let it come to a boil while whisking to dissolve any clumps of sugar. If you caramel recrystallizes and turns grainy after it has cooled, then there is little you can do at that point. It likely means that there was some contamination such as a piece of dust or other particulate in the sugar that induced crystallization.