If you bake for the time and temperature given in the recipe this shouldn't happen. However not all ovens are created equal so if you find the coconut starts to catch, cover it loosely with a sheet of tin foil towards the end of the cooking time.