Better error reporting and tweaked fontFamily comparison to make it more robust