better logging, added endpoint support