better logging / sending \n after messages to get a flush
keep-alive flush