Added a basic debounce check for button presses