Replace explicit close() with context manager