Moved logging to a button