updates message extraction to handle failure