stop polluting console with glyph-cache debug
use debug for debug messages
use iostream instead of printf for increased portability