Added optional callback to log.cb function