added diag.sh