added debug output for diagnostics.