def write_and_logging(message, command, secret = false)
      logging_message = secret ? message : message + command
      @logger.info logging_message
      if @writer.closed?
        @logger.error "Try to write #{command}, but writer closed"
        @commands.clear
      else
        @writer.puts command
      end
    end
def write_and_logging(message, command, secret = false)
      logging_message = secret ? message : message + command
      @logger.info logging_message
      if @writer.closed?
        @logger.error "Try to write #{command}, but writer closed"
        @commands.clear
      else
        @writer.puts command
      end
    end
Send string to process and logging the string
 @param message [String] Message to logging
 @param command [String] Command to send
 @param secret [Boolearn] Choise to logging command