Return close function