fix writing haproxy config