Added logging and button click listener