Added pattern field and error handling