improve error messages
adding well formed xml validation