Added cleanup option to diagnostics page