change log() to debug() and fix bug that required all-or-nothing config