fixed endpoint bug
added logdrain in setup