implement diagnostics command