Added logging functionality to arrow buttons