def self.error(message)
      if defined?(Rails) && Rails.respond_to?(:logger)
        Rails.logger.error(message)
      elsif @logfile
        if @logfile.is_a?(String)