def puts(message)
      message.to_s.each_line do |line|
        if line.end_with?("\n".freeze)
          print "       #{line}"
        else
          print "       #{line}\n"
        end
      end

      $stdout.flush
    rescue ArgumentError, Encoding::CompatibilityError => e
      error_message = e.message
      raise e if error_message !~ /invalid byte sequence/

      error_message << "\n       Invalid string: #{message}"
      raise e, error_message
    end
display a message in line
(indented by 6 spaces)
@param [String] message to be displayed