don't send the last line if it isn't terminated with newline (eg. there is more data in that line)
remove daemon dependency