Updated file handle defer statement location