Only log if debug is set