logd only in debug mode