Database connection closing added.