Code cleanup for UFS close