close() file before dying.