Being cautious about closing every PIL image to prevent leaks