fixed log print; initialized opengl with 4.2 context