add support for category rules
fix logging