polish up log support; simplify command loops