Added logtt.close() statement