Added debug message if debug is enabled