Fetching error message as ANSI C string