doesn't rally matter, but you could do:

```
def write_packet(command)
  if mode.to_s == 'production'
    send_packet(command)
  else
    logger.info "[StatsD] #{command}"
  end
end

def send_packet(command)
  socket.send(command, 0)
rescue SocketError, IOError, SystemCallError => e
  logger.error e
end
```

only thinking that because i try to avoid `begin` whenever i can and instead utilize the implicit `begin` block of a method definition, less indentation.