added button to stop logging