remove redundant check.
converted debugf from macro to a function

This patch replaces debugf macro with a function.

Signed-off-by: Ildar Muslukhov <ildarm@google.com>