Added missing close()