added extra debug code, now prints OpenGL error codes