no need for external access to write failure message

replace attr_accessor with attr_reader