Adds some diagnostics