fixed alarm button not working. Introduced proper logging.