Free up headers, raise exceptions on failure