Update for removing the leaked file descriptor