log module improved and daemon error logging improved