Changed unsafe X11 logging to safe versions