Add RegEx and debug logs