Show message box on fail.
Enable debug output only when logfile is defined; performance optimization.
Fail if reported opengl version is less than 3.0 or errors are generated
after context is created; fixes some crashes on unsupported hardware or
faulty drivers.