fixed rule command and logging