Make sure the heat is not too high, as this can cause the bread to burn before the cheese melts. Lower the heat and give it a little more time. Also grating the cheese before adding it to the sandwich, as it will melt more evenly and quickly.