improve debugging output and check for opengl before generating cache