Added logs to ensure button functionality and declaration of Pattern Class