added data logging and automatic start in main window