Added error checking for font loading