debug output conditionalised