Adds closing statements and CloudManager supports with statements