added log and opengl