added logDaemon and fixed API retrieval