Fetch message string using str method instead of deprecated message attribute