Added some diagnostics