add diagnostics package and console program