Fix problem with DB button in active state, rename err to log.