Working error matching. Only problem is the buffer being 1024