Docs: fixed doc example errors triggered by help-lint and added with-disposal where applicable