Added some regex faliure checks