improved logstash config writing