Fixed vdclose to write current block