Added logging to window