Added better logging and Log window for GUI